From 45ee46cd82dc5bcd0a42835e2d68ab09f3e99279 Mon Sep 17 00:00:00 2001 From: "cl349@freefall.cl.cam.ac.uk" Date: Mon, 25 Oct 2004 17:12:10 +0000 Subject: [PATCH] bitkeeper revision 1.1159.1.272 (417d33eaZEb_tnkLdhSsCNFpEXrEiw) Update to Linux 2.6.9. --- .rootkeys | 273 +++--- .../arch/xen/i386/kernel/pci-dma.c | 106 --- .../asm-i386/mach-xen/mach_resources.h | 106 --- .../agpgart.patch | 0 .../drm.patch | 0 .../arch/xen/Kconfig | 0 .../arch/xen/Kconfig.drivers | 0 .../arch/xen/Makefile | 0 .../arch/xen/boot/Makefile | 0 .../arch/xen/configs/xen0_defconfig | 0 .../arch/xen/configs/xenU_defconfig | 0 .../arch/xen/i386/Kconfig | 0 .../arch/xen/i386/Makefile | 30 +- .../arch/xen/i386/kernel/Makefile | 4 +- .../arch/xen/i386/kernel/cpu/Makefile | 0 .../arch/xen/i386/kernel/cpu/common.c | 7 +- .../arch/xen/i386/kernel/entry.S | 0 .../arch/xen/i386/kernel/head.S | 0 .../arch/xen/i386/kernel/i386_ksyms.c | 23 +- .../arch/xen/i386/kernel/ioport.c | 0 .../arch/xen/i386/kernel/irq.c | 50 +- .../arch/xen/i386/kernel/ldt.c | 9 +- .../arch/xen/i386/kernel/pci-dma.c | 218 +++++ .../arch/xen/i386/kernel/process.c | 103 ++- .../arch/xen/i386/kernel/setup.c | 43 +- .../arch/xen/i386/kernel/signal.c | 80 +- .../arch/xen/i386/kernel/sysenter.c | 8 +- .../arch/xen/i386/kernel/time.c | 17 +- .../arch/xen/i386/kernel/timers/Makefile | 0 .../arch/xen/i386/kernel/timers/timer_tsc.c | 7 +- .../arch/xen/i386/kernel/traps.c | 162 +++- .../arch/xen/i386/kernel/vmlinux.lds.S | 0 .../arch/xen/i386/kernel/vsyscall.S | 0 .../arch/xen/i386/kernel/vsyscall.lds | 0 .../arch/xen/i386/mm/Makefile | 4 +- .../arch/xen/i386/mm/fault.c | 5 +- .../arch/xen/i386/mm/highmem.c | 0 .../arch/xen/i386/mm/hypervisor.c | 0 .../arch/xen/i386/mm/init.c | 6 +- .../arch/xen/i386/mm/ioremap.c | 22 +- .../arch/xen/i386/mm/pageattr.c | 2 +- .../arch/xen/i386/mm/pgtable.c | 0 .../arch/xen/i386/pci/Makefile | 0 .../arch/xen/i386/pci/direct.c | 0 .../arch/xen/i386/pci/irq.c | 0 .../arch/xen/kernel/Makefile | 6 +- .../arch/xen/kernel/ctrl_if.c | 0 .../arch/xen/kernel/empty.c | 0 .../arch/xen/kernel/evtchn.c | 0 .../arch/xen/kernel/fixup.c | 0 .../arch/xen/kernel/gnttab.c | 0 .../arch/xen/kernel/process.c | 4 +- .../arch/xen/kernel/reboot.c | 0 .../arch/xen/kernel/skbuff.c | 0 .../arch/xen/kernel/xen_proc.c | 0 .../drivers/Makefile | 12 +- .../drivers/char/mem.c | 10 +- .../drivers/char/tty_io.c | 819 ++++++++++++++---- .../drivers/xen/Makefile | 0 .../drivers/xen/balloon/Makefile | 0 .../drivers/xen/balloon/balloon.c | 0 .../drivers/xen/blkback/Makefile | 0 .../drivers/xen/blkback/blkback.c | 0 .../drivers/xen/blkback/common.h | 0 .../drivers/xen/blkback/control.c | 0 .../drivers/xen/blkback/interface.c | 0 .../drivers/xen/blkback/vbd.c | 0 .../drivers/xen/blkfront/Kconfig | 0 .../drivers/xen/blkfront/Makefile | 0 .../drivers/xen/blkfront/blkfront.c | 0 .../drivers/xen/blkfront/block.h | 0 .../drivers/xen/blkfront/vbd.c | 0 .../drivers/xen/console/Makefile | 0 .../drivers/xen/console/console.c | 0 .../drivers/xen/evtchn/Makefile | 0 .../drivers/xen/evtchn/evtchn.c | 0 .../drivers/xen/netback/Makefile | 0 .../drivers/xen/netback/common.h | 0 .../drivers/xen/netback/control.c | 0 .../drivers/xen/netback/interface.c | 0 .../drivers/xen/netback/netback.c | 0 .../drivers/xen/netfront/Kconfig | 0 .../drivers/xen/netfront/Makefile | 0 .../drivers/xen/netfront/netfront.c | 0 .../drivers/xen/privcmd/Makefile | 0 .../drivers/xen/privcmd/privcmd.c | 0 .../include/asm-generic/pgtable.h | 8 + .../include/asm-xen/asm-i386/desc.h | 0 .../include/asm-xen/asm-i386/dma-mapping.h | 13 +- .../include/asm-xen/asm-i386/fixmap.h | 21 +- .../include/asm-xen/asm-i386/highmem.h | 0 .../include/asm-xen/asm-i386/io.h | 65 +- .../asm-xen/asm-i386/mach-xen/do_timer.h | 2 +- .../asm-xen/asm-i386/mach-xen/io_ports.h | 0 .../asm-xen/asm-i386/mach-xen/irq_vectors.h | 0 .../asm-xen/asm-i386/mach-xen/mach_mpspec.h | 0 .../asm-xen/asm-i386/mach-xen/mach_reboot.h | 0 .../asm-xen/asm-i386/mach-xen/mach_time.h | 0 .../asm-xen/asm-i386/mach-xen/mach_timer.h | 0 .../asm-xen/asm-i386/mach-xen/mach_traps.h | 0 .../asm-xen/asm-i386/mach-xen/pci-functions.h | 0 .../asm-i386/mach-xen/setup_arch_post.h | 0 .../asm-i386/mach-xen/setup_arch_pre.h | 0 .../include/asm-xen/asm-i386/mmu_context.h | 12 +- .../include/asm-xen/asm-i386/msr.h | 0 .../include/asm-xen/asm-i386/page.h | 8 +- .../include/asm-xen/asm-i386/param.h | 0 .../include/asm-xen/asm-i386/pci.h | 0 .../include/asm-xen/asm-i386/pgalloc.h | 0 .../asm-xen/asm-i386/pgtable-2level-defs.h | 0 .../include/asm-xen/asm-i386/pgtable-2level.h | 7 + .../include/asm-xen/asm-i386/pgtable.h | 7 - .../include/asm-xen/asm-i386/processor.h | 23 +- .../include/asm-xen/asm-i386/ptrace.h | 5 + .../include/asm-xen/asm-i386/segment.h | 0 .../include/asm-xen/asm-i386/setup.h | 0 .../include/asm-xen/asm-i386/synch_bitops.h | 0 .../include/asm-xen/asm-i386/system.h | 0 .../include/asm-xen/asm-i386/timer.h | 1 + .../include/asm-xen/asm-i386/tlbflush.h | 2 +- .../include/asm-xen/asm-i386/vga.h | 0 .../include/asm-xen/asm-i386/xor.h | 0 .../include/asm-xen/ctrl_if.h | 0 .../include/asm-xen/evtchn.h | 0 .../include/asm-xen/gnttab.h | 0 .../include/asm-xen/hypervisor.h | 0 .../include/asm-xen/multicall.h | 0 .../include/asm-xen/proc_cmd.h | 0 .../include/asm-xen/queues.h | 0 .../include/asm-xen/suspend.h | 0 .../include/asm-xen/xen_proc.h | 0 .../include/linux/bio.h | 3 + .../include/linux/page-flags.h | 9 +- .../include/linux/skbuff.h | 43 +- .../mkbuildtree | 0 .../mm/memory.c | 9 +- .../mm/page_alloc.c | 358 ++++---- .../net/core/skbuff.c | 2 + .../net/ipv4/raw.c | 49 ++ 139 files changed, 1809 insertions(+), 974 deletions(-) delete mode 100644 linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/pci-dma.c delete mode 100644 linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_resources.h rename {linux-2.6.8.1-patches => linux-2.6.9-patches}/agpgart.patch (100%) rename {linux-2.6.8.1-patches => linux-2.6.9-patches}/drm.patch (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/Kconfig (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/Kconfig.drivers (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/Makefile (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/boot/Makefile (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/configs/xen0_defconfig (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/configs/xenU_defconfig (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/Kconfig (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/Makefile (74%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/Makefile (97%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/cpu/Makefile (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/cpu/common.c (98%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/entry.S (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/head.S (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/i386_ksyms.c (91%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/ioport.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/irq.c (96%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/ldt.c (97%) create mode 100644 linux-2.6.9-xen-sparse/arch/xen/i386/kernel/pci-dma.c rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/process.c (90%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/setup.c (97%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/signal.c (91%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/sysenter.c (91%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/time.c (97%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/timers/Makefile (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/timers/timer_tsc.c (98%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/traps.c (88%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/vmlinux.lds.S (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/vsyscall.S (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/kernel/vsyscall.lds (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/mm/Makefile (85%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/mm/fault.c (99%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/mm/highmem.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/mm/hypervisor.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/mm/init.c (99%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/mm/ioremap.c (95%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/mm/pageattr.c (98%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/mm/pgtable.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/pci/Makefile (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/pci/direct.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/i386/pci/irq.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/kernel/Makefile (61%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/kernel/ctrl_if.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/kernel/empty.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/kernel/evtchn.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/kernel/fixup.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/kernel/gnttab.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/kernel/process.c (83%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/kernel/reboot.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/kernel/skbuff.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/arch/xen/kernel/xen_proc.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/Makefile (85%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/char/mem.c (99%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/char/tty_io.c (78%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/Makefile (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/balloon/Makefile (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/balloon/balloon.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/blkback/Makefile (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/blkback/blkback.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/blkback/common.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/blkback/control.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/blkback/interface.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/blkback/vbd.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/blkfront/Kconfig (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/blkfront/Makefile (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/blkfront/blkfront.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/blkfront/block.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/blkfront/vbd.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/console/Makefile (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/console/console.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/evtchn/Makefile (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/evtchn/evtchn.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/netback/Makefile (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/netback/common.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/netback/control.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/netback/interface.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/netback/netback.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/netfront/Kconfig (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/netfront/Makefile (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/netfront/netfront.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/privcmd/Makefile (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/drivers/xen/privcmd/privcmd.c (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-generic/pgtable.h (92%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/desc.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/dma-mapping.h (91%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/fixmap.h (94%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/highmem.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/io.h (87%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/mach-xen/do_timer.h (98%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/mach-xen/io_ports.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/mach-xen/irq_vectors.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/mach-xen/mach_mpspec.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/mach-xen/mach_reboot.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/mach-xen/mach_time.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/mach-xen/mach_timer.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/mach-xen/mach_traps.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/mach-xen/pci-functions.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/mmu_context.h (82%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/msr.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/page.h (98%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/param.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/pci.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/pgalloc.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/pgtable-2level-defs.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/pgtable-2level.h (93%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/pgtable.h (98%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/processor.h (97%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/ptrace.h (87%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/segment.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/setup.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/synch_bitops.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/system.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/timer.h (98%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/tlbflush.h (98%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/vga.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/asm-i386/xor.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/ctrl_if.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/evtchn.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/gnttab.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/hypervisor.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/multicall.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/proc_cmd.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/queues.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/suspend.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/asm-xen/xen_proc.h (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/linux/bio.h (98%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/linux/page-flags.h (97%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/include/linux/skbuff.h (97%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/mkbuildtree (100%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/mm/memory.c (99%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/mm/page_alloc.c (88%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/net/core/skbuff.c (99%) rename {linux-2.6.8.1-xen-sparse => linux-2.6.9-xen-sparse}/net/ipv4/raw.c (95%) diff --git a/.rootkeys b/.rootkeys index 3e0e1982a3..15d72abcfa 100644 --- a/.rootkeys +++ b/.rootkeys @@ -124,143 +124,142 @@ 3e5a4e683HKVU-sxtagrDasRB8eBVw linux-2.4.27-xen-sparse/mm/swapfile.c 41180721bNns9Na7w1nJ0ZVt8bhUNA linux-2.4.27-xen-sparse/mm/vmalloc.c 41505c57WAd5l1rlfCLNSCpx9J13vA linux-2.4.27-xen-sparse/net/core/skbuff.c -413aa1d0oNP8HXLvfPuMe6cSroUfSA linux-2.6.8.1-patches/agpgart.patch -413aa1d0ewvSv-ohnNnQQNGsbPTTNA linux-2.6.8.1-patches/drm.patch -40f562372u3A7_kfbYYixPHJJxYUxA linux-2.6.8.1-xen-sparse/arch/xen/Kconfig -40f56237utH41NPukqHksuNf29IC9A linux-2.6.8.1-xen-sparse/arch/xen/Kconfig.drivers -40f56237penAAlWVBVDpeQZNFIg8CA linux-2.6.8.1-xen-sparse/arch/xen/Makefile -40f56237JTc60m1FRlUxkUaGSQKrNw linux-2.6.8.1-xen-sparse/arch/xen/boot/Makefile -40f56237hRxbacU_3PdoAl6DjZ3Jnw linux-2.6.8.1-xen-sparse/arch/xen/configs/xen0_defconfig -40f56237wubfjJKlfIzZlI3ZM2VgGA linux-2.6.8.1-xen-sparse/arch/xen/configs/xenU_defconfig -40f56237Mta0yHNaMS_qtM2rge0qYA linux-2.6.8.1-xen-sparse/arch/xen/i386/Kconfig -40f56238u2CJdXNpjsZgHBxeVyY-2g linux-2.6.8.1-xen-sparse/arch/xen/i386/Makefile -40f56238eczveJ86k_4hNxCLRQIF-g linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/Makefile -40f56238rXVTJQKbBuXXLH52qEArcg linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/cpu/Makefile -40f562385s4lr6Zg92gExe7UQ4A76Q linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/cpu/common.c -40f56238XDtHSijkAFlbv1PT8Bhw_Q linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/entry.S -40f56238bnvciAuyzAiMkdzGErYt1A linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/head.S -40f58a0d31M2EkuPbG94ns_nOi0PVA linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c -40faa751_zbZlAmLyQgCXdYekVFdWA linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/ioport.c -40f562382aC3_Gt4RG-4ZsfvDRUg3Q linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/irq.c -40f56238ue3YRsK52HG7iccNzP1AwQ linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/ldt.c -4107adf1cNtsuOxOB4T6paAoY2R2PA linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/pci-dma.c -40f56238a8iOVDEoostsbun_sy2i4g linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/process.c -40f56238YQIJoYG2ehDGEcdTgLmGbg linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/setup.c -40f56238nWMQg7CKbyTy0KJNvCzbtg linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/signal.c -40f56238UL9uv78ODDzMwLL9yryeFw linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/sysenter.c -40f56238qVGkpO_ycnQA8k03kQzAgA linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c -40f56238NzTgeO63RGoxHrW5NQeO3Q linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/timers/Makefile -40f56238BMqG5PuSHufpjbvp_helBw linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c -40f562389xNa78YBZciUibQjyRU_Lg linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/traps.c -40f56238qASEI_IOhCKWNuwFKNZrKQ linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S -40f56238JypKAUG01ZojFwH7qnZ5uA linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/vsyscall.S -40f56238wi6AdNQjm0RT57bSkwb6hg linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/vsyscall.lds -40f56238a3w6-byOzexIlMgni76Lcg linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/Makefile -40f56238ILx8xlbywNbzTdv5Zr4xXQ linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/fault.c -4118cc35CbY8rfGVspF5O-7EkXBEAA linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/highmem.c -40f562383SKvDStdtrvzr5fyCbW4rw linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/hypervisor.c -40f56239xcNylAxuGsQHwi1AyMLV8w linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/init.c -41062ab7CjxC1UBaFhOMWWdhHkIUyg linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/ioremap.c -413b5ab8LIowAnQrEmaOJSdmqm96jQ linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/pageattr.c -40f5623906UYHv1rsVUeRc0tFT0dWw linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/pgtable.c -4107adf12ndy94MidCaivDibJ3pPAg linux-2.6.8.1-xen-sparse/arch/xen/i386/pci/Makefile -4107adf1WcCgkhsdLTRGX52cOG1vJg linux-2.6.8.1-xen-sparse/arch/xen/i386/pci/direct.c -4107adf1s5u6249DNPUViX1YNagbUQ linux-2.6.8.1-xen-sparse/arch/xen/i386/pci/irq.c -40f56239zOksGg_H4XD4ye6iZNtoZA linux-2.6.8.1-xen-sparse/arch/xen/kernel/Makefile -40f56239bvOjuuuViZ0XMlNiREFC0A linux-2.6.8.1-xen-sparse/arch/xen/kernel/ctrl_if.c -40f56239pYRq5yshPTkv3ujXKc8K6g linux-2.6.8.1-xen-sparse/arch/xen/kernel/empty.c -40f56238xFQe9T7M_U_FItM-bZIpLw linux-2.6.8.1-xen-sparse/arch/xen/kernel/evtchn.c -4110f478aeQWllIN7J4kouAHiAqrPw linux-2.6.8.1-xen-sparse/arch/xen/kernel/fixup.c -412dfae9eA3_6e6bCGUtg1mj8b56fQ linux-2.6.8.1-xen-sparse/arch/xen/kernel/gnttab.c -40f56239sFcjHiIRmnObRIDF-zaeKQ linux-2.6.8.1-xen-sparse/arch/xen/kernel/process.c -40f562392LBhwmOxVPsYdkYXMxI_ZQ linux-2.6.8.1-xen-sparse/arch/xen/kernel/reboot.c -414c113396tK1HTVeUalm3u-1DF16g linux-2.6.8.1-xen-sparse/arch/xen/kernel/skbuff.c -3f68905c5eiA-lBMQSvXLMWS1ikDEA linux-2.6.8.1-xen-sparse/arch/xen/kernel/xen_proc.c -41261688yS8eAyy-7kzG4KBs0xbYCA linux-2.6.8.1-xen-sparse/drivers/Makefile -4108f5c1WfTIrs0HZFeV39sttekCTw linux-2.6.8.1-xen-sparse/drivers/char/mem.c -4111308bZAIzwf_Kzu6x1TZYZ3E0_Q linux-2.6.8.1-xen-sparse/drivers/char/tty_io.c -40f56239Dp_vMTgz8TEbvo1hjHGc3w linux-2.6.8.1-xen-sparse/drivers/xen/Makefile -41768fbcncpBQf8s2l2-CwoSNIZ9uA linux-2.6.8.1-xen-sparse/drivers/xen/balloon/Makefile -3e6377f8i5e9eGz7Pw6fQuhuTQ7DQg linux-2.6.8.1-xen-sparse/drivers/xen/balloon/balloon.c -410d0893otFGghmv4dUXDUBBdY5aIA linux-2.6.8.1-xen-sparse/drivers/xen/blkback/Makefile -4087cf0d1XgMkooTZAiJS6NrcpLQNQ linux-2.6.8.1-xen-sparse/drivers/xen/blkback/blkback.c -4087cf0dZadZ8r6CEt4fNN350Yle3A linux-2.6.8.1-xen-sparse/drivers/xen/blkback/common.h -4087cf0dxlh29iw0w-9rxOCEGCjPcw linux-2.6.8.1-xen-sparse/drivers/xen/blkback/control.c -4087cf0dbuoH20fMjNZjcgrRK-1msQ linux-2.6.8.1-xen-sparse/drivers/xen/blkback/interface.c -4087cf0dk97tacDzxfByWV7JifUYqA linux-2.6.8.1-xen-sparse/drivers/xen/blkback/vbd.c -40f56239Sfle6wGv5FS0wjS_HI150A linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/Kconfig -40f562395atl9x4suKGhPkjqLOXESg linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/Makefile -40f56239-JNIaTzlviVJohVdoYOUpw linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/blkfront.c -40f56239y9naBTXe40Pi2J_z3p-d1g linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/block.h -40f56239BVfPsXBiWQitXgDRtOsiqg linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/vbd.c -40f56239fsLjvtD8YBRAWphps4FDjg linux-2.6.8.1-xen-sparse/drivers/xen/console/Makefile -3e5a4e651TH-SXHoufurnWjgl5bfOA linux-2.6.8.1-xen-sparse/drivers/xen/console/console.c -40f56239KYxO0YabhPzCTeUuln-lnA linux-2.6.8.1-xen-sparse/drivers/xen/evtchn/Makefile -40f56239DoibTX6R-ZYd3QTXAB8_TA linux-2.6.8.1-xen-sparse/drivers/xen/evtchn/evtchn.c -410a9817HEVJvred5Oy_uKH3HFJC5Q linux-2.6.8.1-xen-sparse/drivers/xen/netback/Makefile -4097ba831lpGeLlPg-bfV8XarVVuoQ linux-2.6.8.1-xen-sparse/drivers/xen/netback/common.h -4097ba83wvv8yi5P5xugCUBAdb6O-A linux-2.6.8.1-xen-sparse/drivers/xen/netback/control.c -4097ba83byY5bTSugJGZ1exTxIcMKw linux-2.6.8.1-xen-sparse/drivers/xen/netback/interface.c -4087cf0dGmSbFhFZyIZBJzvqxY-qBw linux-2.6.8.1-xen-sparse/drivers/xen/netback/netback.c -40f56239lrg_Ob0BJ8WBFS1zeg2CYw linux-2.6.8.1-xen-sparse/drivers/xen/netfront/Kconfig -40f56239Wd4k_ycG_mFsSO1r5xKdtQ linux-2.6.8.1-xen-sparse/drivers/xen/netfront/Makefile -405853f6nbeazrNyEWNHBuoSg2PiPA linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c -4108f5c1ppFXVpQzCOAZ6xXYubsjKA linux-2.6.8.1-xen-sparse/drivers/xen/privcmd/Makefile -3e5a4e65IUfzzMu2kZFlGEB8-rpTaA linux-2.6.8.1-xen-sparse/drivers/xen/privcmd/privcmd.c -412f47e4RKD-R5IS5gEXvcT8L4v8gA linux-2.6.8.1-xen-sparse/include/asm-generic/pgtable.h -40f56239YAjS52QG2FIAQpHDZAdGHg linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/desc.h -4107adf1E5O4ztGHNGMzCCNhcvqNow linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h -40f5623akIoBsQ3KxSB2kufkbgONXQ linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/fixmap.h -4118b6a418gnL6AZsTdglC92YGqYTg linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/highmem.h -40f5623aJVXQwpJMOLE99XgvGsfQ8Q linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/io.h -40f5623am9BzluYFuV6EQfTd-so3dA linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/do_timer.h -40f5623adZQ1IZGPxbDXONjyZGYuTA linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/io_ports.h -40f5623aKXkBBxgpLx2NcvkncQ1Yyw linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h -40f5623aMQZoYuf4ml9v69N3gu8ing linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_mpspec.h -40f5623a8LroVMnZ5YRzJJmIc-zHlw linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_reboot.h -40f5623an3wOvFKmpIvqSxQfWzklVQ linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_resources.h -40f5623ayR1vnzfF__htza35a8Ft-g linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_time.h -40f5623a4YdRdVzYWJzOOoqe8mnrXA linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_timer.h -40f5623aDLxmbOtUHvkWztKjAO4EjA linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_traps.h -41062ab7HMSSuaUv3_Z4agLpjSO88A linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/pci-functions.h -40f5623aDMCsWOFO0jktZ4e8sjwvEg linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h -40f5623arsFXkGdPvIqvFi3yFXGR0Q linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h -4120f807GCO0uqsLqdZj9csxR1Wthw linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mmu_context.h -40f5623aFTyFTR-vdiA-KaGxk5JOKQ linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/msr.h -40f5623adgjZq9nAgCt0IXdWl7udSA linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/page.h -40f5623a54NuG-7qHihGYmw4wWQnMA linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/param.h -41137cc1kkvg0cg7uxddcEfjL7L67w linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pci.h -40f5623atCokYc2uCysSJ8jFO8TEsw linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pgalloc.h -412e01beTwiaC8sYY4XJP8PxLST5CA linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h -40f5623aEToIXouJgO-ao5d5pcEt1w linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h -40f5623aCCXRPlGpNthVXstGz9ZV3A linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pgtable.h -40f5623aPCkQQfPtJSooGdhcatrvnQ linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/processor.h -412ea0afQL2CAI-f522TbLjLPMibPQ linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/ptrace.h -40f5623bzLvxr7WoJIxVf2OH4rCBJg linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/segment.h -40f5623bG_LzgG6-qwk292nTc5Wabw linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/setup.h -40f5623bgzm_9vwxpzJswlAxg298Gg linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h -40f5623bVdKP7Dt7qm8twu3NcnGNbA linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/system.h -40f5623bSgGrvrGRpD71K-lIYqaGgg linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/timer.h -40f5623bc8LKPRO09wY5dGDnY_YCpw linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/tlbflush.h -41062ab7uFxnCq-KtPeAm-aV8CicgA linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/vga.h -40f5623bxUbeGjkRrjDguCy_Gm8RLw linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/xor.h -40f5623bYNP7tHE2zX6YQxp9Zq2utQ linux-2.6.8.1-xen-sparse/include/asm-xen/ctrl_if.h -40f5623b3Eqs8pAc5WpPX8_jTzV2qw linux-2.6.8.1-xen-sparse/include/asm-xen/evtchn.h -412dfaeazclyNDM0cpnp60Yo4xulpQ linux-2.6.8.1-xen-sparse/include/asm-xen/gnttab.h -40f5623aGPlsm0u1LTO-NVZ6AGzNRQ linux-2.6.8.1-xen-sparse/include/asm-xen/hypervisor.h -40f5623cndVUFlkxpf7Lfx7xu8madQ linux-2.6.8.1-xen-sparse/include/asm-xen/multicall.h -3f108af1ylCIm82H052FVTfXACBHrw linux-2.6.8.1-xen-sparse/include/asm-xen/proc_cmd.h -4122466356eIBnC9ot44WSVVIFyhQA linux-2.6.8.1-xen-sparse/include/asm-xen/queues.h -3fa8e3f0kBLeE4To2vpdi3cpJbIkbQ linux-2.6.8.1-xen-sparse/include/asm-xen/suspend.h -3f689063BoW-HWV3auUJ-OqXfcGArw linux-2.6.8.1-xen-sparse/include/asm-xen/xen_proc.h -4124d8c4aocX7A-jIbuGraWN84pxGQ linux-2.6.8.1-xen-sparse/include/linux/bio.h -4124f66fp5QwbDHEfoUIa7pqO5Xhag linux-2.6.8.1-xen-sparse/include/linux/page-flags.h -4124f66f4NaKNa0xPiGGykn9QaZk3w linux-2.6.8.1-xen-sparse/include/linux/skbuff.h -40f56a0ddHCSs3501MY4hRf22tctOw linux-2.6.8.1-xen-sparse/mkbuildtree -412f46c0LJuKAgSPGoC0Z1DEkLfuLA linux-2.6.8.1-xen-sparse/mm/memory.c -410a94a4KT6I6X0LVc7djB39tRDp4g linux-2.6.8.1-xen-sparse/mm/page_alloc.c -41505c572m-s9ATiO1LiD1GPznTTIg linux-2.6.8.1-xen-sparse/net/core/skbuff.c -4149ec79wMpIHdvbntxqVGLRZZjPxw linux-2.6.8.1-xen-sparse/net/ipv4/raw.c +413aa1d0oNP8HXLvfPuMe6cSroUfSA linux-2.6.9-patches/agpgart.patch +413aa1d0ewvSv-ohnNnQQNGsbPTTNA linux-2.6.9-patches/drm.patch +40f562372u3A7_kfbYYixPHJJxYUxA linux-2.6.9-xen-sparse/arch/xen/Kconfig +40f56237utH41NPukqHksuNf29IC9A linux-2.6.9-xen-sparse/arch/xen/Kconfig.drivers +40f56237penAAlWVBVDpeQZNFIg8CA linux-2.6.9-xen-sparse/arch/xen/Makefile +40f56237JTc60m1FRlUxkUaGSQKrNw linux-2.6.9-xen-sparse/arch/xen/boot/Makefile +40f56237hRxbacU_3PdoAl6DjZ3Jnw linux-2.6.9-xen-sparse/arch/xen/configs/xen0_defconfig +40f56237wubfjJKlfIzZlI3ZM2VgGA linux-2.6.9-xen-sparse/arch/xen/configs/xenU_defconfig +40f56237Mta0yHNaMS_qtM2rge0qYA linux-2.6.9-xen-sparse/arch/xen/i386/Kconfig +40f56238u2CJdXNpjsZgHBxeVyY-2g linux-2.6.9-xen-sparse/arch/xen/i386/Makefile +40f56238eczveJ86k_4hNxCLRQIF-g linux-2.6.9-xen-sparse/arch/xen/i386/kernel/Makefile +40f56238rXVTJQKbBuXXLH52qEArcg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/Makefile +40f562385s4lr6Zg92gExe7UQ4A76Q linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/common.c +40f56238XDtHSijkAFlbv1PT8Bhw_Q linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S +40f56238bnvciAuyzAiMkdzGErYt1A linux-2.6.9-xen-sparse/arch/xen/i386/kernel/head.S +40f58a0d31M2EkuPbG94ns_nOi0PVA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c +40faa751_zbZlAmLyQgCXdYekVFdWA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ioport.c +40f562382aC3_Gt4RG-4ZsfvDRUg3Q linux-2.6.9-xen-sparse/arch/xen/i386/kernel/irq.c +40f56238ue3YRsK52HG7iccNzP1AwQ linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ldt.c +4107adf1cNtsuOxOB4T6paAoY2R2PA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/pci-dma.c +40f56238a8iOVDEoostsbun_sy2i4g linux-2.6.9-xen-sparse/arch/xen/i386/kernel/process.c +40f56238YQIJoYG2ehDGEcdTgLmGbg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/setup.c +40f56238nWMQg7CKbyTy0KJNvCzbtg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/signal.c +40f56238UL9uv78ODDzMwLL9yryeFw linux-2.6.9-xen-sparse/arch/xen/i386/kernel/sysenter.c +40f56238qVGkpO_ycnQA8k03kQzAgA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c +40f56238NzTgeO63RGoxHrW5NQeO3Q linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/Makefile +40f56238BMqG5PuSHufpjbvp_helBw linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c +40f562389xNa78YBZciUibQjyRU_Lg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/traps.c +40f56238qASEI_IOhCKWNuwFKNZrKQ linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S +40f56238JypKAUG01ZojFwH7qnZ5uA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vsyscall.S +40f56238wi6AdNQjm0RT57bSkwb6hg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vsyscall.lds +40f56238a3w6-byOzexIlMgni76Lcg linux-2.6.9-xen-sparse/arch/xen/i386/mm/Makefile +40f56238ILx8xlbywNbzTdv5Zr4xXQ linux-2.6.9-xen-sparse/arch/xen/i386/mm/fault.c +4118cc35CbY8rfGVspF5O-7EkXBEAA linux-2.6.9-xen-sparse/arch/xen/i386/mm/highmem.c +40f562383SKvDStdtrvzr5fyCbW4rw linux-2.6.9-xen-sparse/arch/xen/i386/mm/hypervisor.c +40f56239xcNylAxuGsQHwi1AyMLV8w linux-2.6.9-xen-sparse/arch/xen/i386/mm/init.c +41062ab7CjxC1UBaFhOMWWdhHkIUyg linux-2.6.9-xen-sparse/arch/xen/i386/mm/ioremap.c +413b5ab8LIowAnQrEmaOJSdmqm96jQ linux-2.6.9-xen-sparse/arch/xen/i386/mm/pageattr.c +40f5623906UYHv1rsVUeRc0tFT0dWw linux-2.6.9-xen-sparse/arch/xen/i386/mm/pgtable.c +4107adf12ndy94MidCaivDibJ3pPAg linux-2.6.9-xen-sparse/arch/xen/i386/pci/Makefile +4107adf1WcCgkhsdLTRGX52cOG1vJg linux-2.6.9-xen-sparse/arch/xen/i386/pci/direct.c +4107adf1s5u6249DNPUViX1YNagbUQ linux-2.6.9-xen-sparse/arch/xen/i386/pci/irq.c +40f56239zOksGg_H4XD4ye6iZNtoZA linux-2.6.9-xen-sparse/arch/xen/kernel/Makefile +40f56239bvOjuuuViZ0XMlNiREFC0A linux-2.6.9-xen-sparse/arch/xen/kernel/ctrl_if.c +40f56239pYRq5yshPTkv3ujXKc8K6g linux-2.6.9-xen-sparse/arch/xen/kernel/empty.c +40f56238xFQe9T7M_U_FItM-bZIpLw linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c +4110f478aeQWllIN7J4kouAHiAqrPw linux-2.6.9-xen-sparse/arch/xen/kernel/fixup.c +412dfae9eA3_6e6bCGUtg1mj8b56fQ linux-2.6.9-xen-sparse/arch/xen/kernel/gnttab.c +40f56239sFcjHiIRmnObRIDF-zaeKQ linux-2.6.9-xen-sparse/arch/xen/kernel/process.c +40f562392LBhwmOxVPsYdkYXMxI_ZQ linux-2.6.9-xen-sparse/arch/xen/kernel/reboot.c +414c113396tK1HTVeUalm3u-1DF16g linux-2.6.9-xen-sparse/arch/xen/kernel/skbuff.c +3f68905c5eiA-lBMQSvXLMWS1ikDEA linux-2.6.9-xen-sparse/arch/xen/kernel/xen_proc.c +41261688yS8eAyy-7kzG4KBs0xbYCA linux-2.6.9-xen-sparse/drivers/Makefile +4108f5c1WfTIrs0HZFeV39sttekCTw linux-2.6.9-xen-sparse/drivers/char/mem.c +4111308bZAIzwf_Kzu6x1TZYZ3E0_Q linux-2.6.9-xen-sparse/drivers/char/tty_io.c +40f56239Dp_vMTgz8TEbvo1hjHGc3w linux-2.6.9-xen-sparse/drivers/xen/Makefile +41768fbcncpBQf8s2l2-CwoSNIZ9uA linux-2.6.9-xen-sparse/drivers/xen/balloon/Makefile +3e6377f8i5e9eGz7Pw6fQuhuTQ7DQg linux-2.6.9-xen-sparse/drivers/xen/balloon/balloon.c +410d0893otFGghmv4dUXDUBBdY5aIA linux-2.6.9-xen-sparse/drivers/xen/blkback/Makefile +4087cf0d1XgMkooTZAiJS6NrcpLQNQ linux-2.6.9-xen-sparse/drivers/xen/blkback/blkback.c +4087cf0dZadZ8r6CEt4fNN350Yle3A linux-2.6.9-xen-sparse/drivers/xen/blkback/common.h +4087cf0dxlh29iw0w-9rxOCEGCjPcw linux-2.6.9-xen-sparse/drivers/xen/blkback/control.c +4087cf0dbuoH20fMjNZjcgrRK-1msQ linux-2.6.9-xen-sparse/drivers/xen/blkback/interface.c +4087cf0dk97tacDzxfByWV7JifUYqA linux-2.6.9-xen-sparse/drivers/xen/blkback/vbd.c +40f56239Sfle6wGv5FS0wjS_HI150A linux-2.6.9-xen-sparse/drivers/xen/blkfront/Kconfig +40f562395atl9x4suKGhPkjqLOXESg linux-2.6.9-xen-sparse/drivers/xen/blkfront/Makefile +40f56239-JNIaTzlviVJohVdoYOUpw linux-2.6.9-xen-sparse/drivers/xen/blkfront/blkfront.c +40f56239y9naBTXe40Pi2J_z3p-d1g linux-2.6.9-xen-sparse/drivers/xen/blkfront/block.h +40f56239BVfPsXBiWQitXgDRtOsiqg linux-2.6.9-xen-sparse/drivers/xen/blkfront/vbd.c +40f56239fsLjvtD8YBRAWphps4FDjg linux-2.6.9-xen-sparse/drivers/xen/console/Makefile +3e5a4e651TH-SXHoufurnWjgl5bfOA linux-2.6.9-xen-sparse/drivers/xen/console/console.c +40f56239KYxO0YabhPzCTeUuln-lnA linux-2.6.9-xen-sparse/drivers/xen/evtchn/Makefile +40f56239DoibTX6R-ZYd3QTXAB8_TA linux-2.6.9-xen-sparse/drivers/xen/evtchn/evtchn.c +410a9817HEVJvred5Oy_uKH3HFJC5Q linux-2.6.9-xen-sparse/drivers/xen/netback/Makefile +4097ba831lpGeLlPg-bfV8XarVVuoQ linux-2.6.9-xen-sparse/drivers/xen/netback/common.h +4097ba83wvv8yi5P5xugCUBAdb6O-A linux-2.6.9-xen-sparse/drivers/xen/netback/control.c +4097ba83byY5bTSugJGZ1exTxIcMKw linux-2.6.9-xen-sparse/drivers/xen/netback/interface.c +4087cf0dGmSbFhFZyIZBJzvqxY-qBw linux-2.6.9-xen-sparse/drivers/xen/netback/netback.c +40f56239lrg_Ob0BJ8WBFS1zeg2CYw linux-2.6.9-xen-sparse/drivers/xen/netfront/Kconfig +40f56239Wd4k_ycG_mFsSO1r5xKdtQ linux-2.6.9-xen-sparse/drivers/xen/netfront/Makefile +405853f6nbeazrNyEWNHBuoSg2PiPA linux-2.6.9-xen-sparse/drivers/xen/netfront/netfront.c +4108f5c1ppFXVpQzCOAZ6xXYubsjKA linux-2.6.9-xen-sparse/drivers/xen/privcmd/Makefile +3e5a4e65IUfzzMu2kZFlGEB8-rpTaA linux-2.6.9-xen-sparse/drivers/xen/privcmd/privcmd.c +412f47e4RKD-R5IS5gEXvcT8L4v8gA linux-2.6.9-xen-sparse/include/asm-generic/pgtable.h +40f56239YAjS52QG2FIAQpHDZAdGHg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/desc.h +4107adf1E5O4ztGHNGMzCCNhcvqNow linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h +40f5623akIoBsQ3KxSB2kufkbgONXQ linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/fixmap.h +4118b6a418gnL6AZsTdglC92YGqYTg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/highmem.h +40f5623aJVXQwpJMOLE99XgvGsfQ8Q linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/io.h +40f5623am9BzluYFuV6EQfTd-so3dA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/do_timer.h +40f5623adZQ1IZGPxbDXONjyZGYuTA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/io_ports.h +40f5623aKXkBBxgpLx2NcvkncQ1Yyw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h +40f5623aMQZoYuf4ml9v69N3gu8ing linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_mpspec.h +40f5623a8LroVMnZ5YRzJJmIc-zHlw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_reboot.h +40f5623ayR1vnzfF__htza35a8Ft-g linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_time.h +40f5623a4YdRdVzYWJzOOoqe8mnrXA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_timer.h +40f5623aDLxmbOtUHvkWztKjAO4EjA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_traps.h +41062ab7HMSSuaUv3_Z4agLpjSO88A linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/pci-functions.h +40f5623aDMCsWOFO0jktZ4e8sjwvEg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h +40f5623arsFXkGdPvIqvFi3yFXGR0Q linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h +4120f807GCO0uqsLqdZj9csxR1Wthw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mmu_context.h +40f5623aFTyFTR-vdiA-KaGxk5JOKQ linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/msr.h +40f5623adgjZq9nAgCt0IXdWl7udSA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/page.h +40f5623a54NuG-7qHihGYmw4wWQnMA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/param.h +41137cc1kkvg0cg7uxddcEfjL7L67w linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pci.h +40f5623atCokYc2uCysSJ8jFO8TEsw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgalloc.h +412e01beTwiaC8sYY4XJP8PxLST5CA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h +40f5623aEToIXouJgO-ao5d5pcEt1w linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h +40f5623aCCXRPlGpNthVXstGz9ZV3A linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable.h +40f5623aPCkQQfPtJSooGdhcatrvnQ linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/processor.h +412ea0afQL2CAI-f522TbLjLPMibPQ linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/ptrace.h +40f5623bzLvxr7WoJIxVf2OH4rCBJg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/segment.h +40f5623bG_LzgG6-qwk292nTc5Wabw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/setup.h +40f5623bgzm_9vwxpzJswlAxg298Gg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h +40f5623bVdKP7Dt7qm8twu3NcnGNbA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/system.h +40f5623bSgGrvrGRpD71K-lIYqaGgg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/timer.h +40f5623bc8LKPRO09wY5dGDnY_YCpw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/tlbflush.h +41062ab7uFxnCq-KtPeAm-aV8CicgA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/vga.h +40f5623bxUbeGjkRrjDguCy_Gm8RLw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/xor.h +40f5623bYNP7tHE2zX6YQxp9Zq2utQ linux-2.6.9-xen-sparse/include/asm-xen/ctrl_if.h +40f5623b3Eqs8pAc5WpPX8_jTzV2qw linux-2.6.9-xen-sparse/include/asm-xen/evtchn.h +412dfaeazclyNDM0cpnp60Yo4xulpQ linux-2.6.9-xen-sparse/include/asm-xen/gnttab.h +40f5623aGPlsm0u1LTO-NVZ6AGzNRQ linux-2.6.9-xen-sparse/include/asm-xen/hypervisor.h +40f5623cndVUFlkxpf7Lfx7xu8madQ linux-2.6.9-xen-sparse/include/asm-xen/multicall.h +3f108af1ylCIm82H052FVTfXACBHrw linux-2.6.9-xen-sparse/include/asm-xen/proc_cmd.h +4122466356eIBnC9ot44WSVVIFyhQA linux-2.6.9-xen-sparse/include/asm-xen/queues.h +3fa8e3f0kBLeE4To2vpdi3cpJbIkbQ linux-2.6.9-xen-sparse/include/asm-xen/suspend.h +3f689063BoW-HWV3auUJ-OqXfcGArw linux-2.6.9-xen-sparse/include/asm-xen/xen_proc.h +4124d8c4aocX7A-jIbuGraWN84pxGQ linux-2.6.9-xen-sparse/include/linux/bio.h +4124f66fp5QwbDHEfoUIa7pqO5Xhag linux-2.6.9-xen-sparse/include/linux/page-flags.h +4124f66f4NaKNa0xPiGGykn9QaZk3w linux-2.6.9-xen-sparse/include/linux/skbuff.h +40f56a0ddHCSs3501MY4hRf22tctOw linux-2.6.9-xen-sparse/mkbuildtree +412f46c0LJuKAgSPGoC0Z1DEkLfuLA linux-2.6.9-xen-sparse/mm/memory.c +410a94a4KT6I6X0LVc7djB39tRDp4g linux-2.6.9-xen-sparse/mm/page_alloc.c +41505c572m-s9ATiO1LiD1GPznTTIg linux-2.6.9-xen-sparse/net/core/skbuff.c +4149ec79wMpIHdvbntxqVGLRZZjPxw linux-2.6.9-xen-sparse/net/ipv4/raw.c 413cb1e4zst25MDYjg63Y-NGC5_pLg netbsd-2.0-xen-sparse/Makefile 413cb1e5c_Mkxf_X0zimEhTKI_l4DA netbsd-2.0-xen-sparse/mkbuildtree 413cb1e5kY_Zil7-b0kI6hvCIxBEYg netbsd-2.0-xen-sparse/nbconfig-xen diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/pci-dma.c b/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/pci-dma.c deleted file mode 100644 index 06a86596cb..0000000000 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/pci-dma.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Dynamic DMA mapping support. - * - * On i386 there is no hardware dynamic DMA address translation, - * so consistent alloc/free are merely page allocation/freeing. - * The rest of the dynamic DMA mapping interface is implemented - * in asm/pci.h. - */ - -#include -#include -#include -#include -#include -#include - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -#define pte_offset_kernel pte_offset -void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, - dma_addr_t *dma_handle) -#else -void *dma_alloc_coherent(struct device *dev, size_t size, - dma_addr_t *dma_handle, int gfp) -#endif -{ - void *ret; - unsigned int order = get_order(size); - unsigned long vstart; - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - int gfp = GFP_ATOMIC; - - if (hwdev == NULL || ((u32)hwdev->dma_mask < 0xffffffff)) - gfp |= GFP_DMA; -#else - /* ignore region specifiers */ - gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); - - if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff)) - gfp |= GFP_DMA; -#endif - - vstart = __get_free_pages(gfp, order); - ret = (void *)vstart; - if (ret == NULL) - return ret; - - /* - * Ensure multi-page extents are contiguous in machine memory. - * This code could be cleaned up some, and the number of - * hypercalls reduced. - */ - if (size > PAGE_SIZE) { - pgd_t *pgd; - pmd_t *pmd; - pte_t *pte; - unsigned long pfn, i; - scrub_pages(vstart, 1 << order); - /* 1. Zap current PTEs, giving away the underlying pages. */ - for (i = 0; i < (1<pte_low >> PAGE_SHIFT; - queue_l1_entry_update(pte, 0); - phys_to_machine_mapping[(__pa(ret)>>PAGE_SHIFT)+i] = - INVALID_P2M_ENTRY; - flush_page_update_queue(); - if (HYPERVISOR_dom_mem_op(MEMOP_decrease_reservation, - &pfn, 1, 0) != 1) BUG(); - } - /* 2. Get a new contiguous memory extent. */ - if (HYPERVISOR_dom_mem_op(MEMOP_increase_reservation, - &pfn, 1, order) != 1) BUG(); - /* 3. Map the new extent in place of old pages. */ - for (i = 0; i < (1<>PAGE_SHIFT)+i); - phys_to_machine_mapping[(__pa(ret)>>PAGE_SHIFT)+i] = - pfn+i; - } - /* Flush updates through and flush the TLB. */ - xen_tlb_flush(); - } - - memset(ret, 0, size); - *dma_handle = virt_to_bus(ret); - - return ret; -} - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -void pci_free_consistent(struct pci_dev *hwdev, size_t size, - void *vaddr, dma_addr_t dma_handle) -#else -void dma_free_coherent(struct device *dev, size_t size, - void *vaddr, dma_addr_t dma_handle) -#endif -{ - free_pages((unsigned long)vaddr, get_order(size)); -} diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_resources.h b/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_resources.h deleted file mode 100644 index b37858d0d0..0000000000 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_resources.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * include/asm-i386/mach-default/mach_resources.h - * - * Machine specific resource allocation for generic. - * Split out from setup.c by Osamu Tomita - */ -#ifndef _MACH_RESOURCES_H -#define _MACH_RESOURCES_H - -struct resource standard_io_resources[] = { - { "dma1", 0x00, 0x1f, IORESOURCE_BUSY }, - { "pic1", 0x20, 0x21, IORESOURCE_BUSY }, - { "timer", 0x40, 0x5f, IORESOURCE_BUSY }, - { "keyboard", 0x60, 0x6f, IORESOURCE_BUSY }, - { "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY }, - { "pic2", 0xa0, 0xa1, IORESOURCE_BUSY }, - { "dma2", 0xc0, 0xdf, IORESOURCE_BUSY }, - { "fpu", 0xf0, 0xff, IORESOURCE_BUSY } -}; - -#define STANDARD_IO_RESOURCES (sizeof(standard_io_resources)/sizeof(struct resource)) - -static struct resource vram_resource = { "Video RAM area", 0xa0000, 0xbffff, IORESOURCE_BUSY }; - -/* System ROM resources */ -#define MAXROMS 6 -static struct resource rom_resources[MAXROMS] = { - { "System ROM", 0xF0000, 0xFFFFF, IORESOURCE_BUSY }, - { "Video ROM", 0xc0000, 0xc7fff, IORESOURCE_BUSY } -}; - -#define romsignature(x) (*(unsigned short *)(x) == 0xaa55) - -static inline void probe_video_rom(int roms) -{ - unsigned long base; - unsigned char *romstart; - - - /* Video ROM is standard at C000:0000 - C7FF:0000, check signature */ - for (base = 0xC0000; base < 0xE0000; base += 2048) { - romstart = isa_bus_to_virt(base); - if (!romsignature(romstart)) - continue; - request_resource(&iomem_resource, rom_resources + roms); - roms++; - break; - } -} - -static inline void probe_extension_roms(int roms) -{ - unsigned long base; - unsigned char *romstart; - - /* Extension roms at C800:0000 - DFFF:0000 */ - for (base = 0xC8000; base < 0xE0000; base += 2048) { - unsigned long length; - - romstart = isa_bus_to_virt(base); - if (!romsignature(romstart)) - continue; - length = romstart[2] * 512; - if (length) { - unsigned int i; - unsigned char chksum; - - chksum = 0; - for (i = 0; i < length; i++) - chksum += romstart[i]; - - /* Good checksum? */ - if (!chksum) { - rom_resources[roms].start = base; - rom_resources[roms].end = base + length - 1; - rom_resources[roms].name = "Extension ROM"; - rom_resources[roms].flags = IORESOURCE_BUSY; - - request_resource(&iomem_resource, rom_resources + roms); - roms++; - if (roms >= MAXROMS) - return; - } - } - } - - /* Final check for motherboard extension rom at E000:0000 */ - base = 0xE0000; - romstart = isa_bus_to_virt(base); - - if (romsignature(romstart)) { - rom_resources[roms].start = base; - rom_resources[roms].end = base + 65535; - rom_resources[roms].name = "Extension ROM"; - rom_resources[roms].flags = IORESOURCE_BUSY; - - request_resource(&iomem_resource, rom_resources + roms); - } -} - -static inline void request_graphics_resource(void) -{ - request_resource(&iomem_resource, &vram_resource); -} - -#endif /* !_MACH_RESOURCES_H */ diff --git a/linux-2.6.8.1-patches/agpgart.patch b/linux-2.6.9-patches/agpgart.patch similarity index 100% rename from linux-2.6.8.1-patches/agpgart.patch rename to linux-2.6.9-patches/agpgart.patch diff --git a/linux-2.6.8.1-patches/drm.patch b/linux-2.6.9-patches/drm.patch similarity index 100% rename from linux-2.6.8.1-patches/drm.patch rename to linux-2.6.9-patches/drm.patch diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/Kconfig b/linux-2.6.9-xen-sparse/arch/xen/Kconfig similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/Kconfig rename to linux-2.6.9-xen-sparse/arch/xen/Kconfig diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/Kconfig.drivers b/linux-2.6.9-xen-sparse/arch/xen/Kconfig.drivers similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/Kconfig.drivers rename to linux-2.6.9-xen-sparse/arch/xen/Kconfig.drivers diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/Makefile b/linux-2.6.9-xen-sparse/arch/xen/Makefile similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/Makefile rename to linux-2.6.9-xen-sparse/arch/xen/Makefile diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/boot/Makefile b/linux-2.6.9-xen-sparse/arch/xen/boot/Makefile similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/boot/Makefile rename to linux-2.6.9-xen-sparse/arch/xen/boot/Makefile diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/configs/xen0_defconfig b/linux-2.6.9-xen-sparse/arch/xen/configs/xen0_defconfig similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/configs/xen0_defconfig rename to linux-2.6.9-xen-sparse/arch/xen/configs/xen0_defconfig diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/configs/xenU_defconfig b/linux-2.6.9-xen-sparse/arch/xen/configs/xenU_defconfig similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/configs/xenU_defconfig rename to linux-2.6.9-xen-sparse/arch/xen/configs/xenU_defconfig diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/Kconfig b/linux-2.6.9-xen-sparse/arch/xen/i386/Kconfig similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/Kconfig rename to linux-2.6.9-xen-sparse/arch/xen/i386/Kconfig diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/Makefile b/linux-2.6.9-xen-sparse/arch/xen/i386/Makefile similarity index 74% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/Makefile rename to linux-2.6.9-xen-sparse/arch/xen/i386/Makefile index a95f970f01..2fcb9fe606 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/Makefile +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/Makefile @@ -24,31 +24,31 @@ CHECK := $(CHECK) -D__i386__=1 CFLAGS += -pipe -msoft-float # prevent gcc from keeping the stack 16 byte aligned -CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,) +CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2,) -align := $(subst -functions=0,,$(call check_gcc,-falign-functions=0,-malign-functions=0)) +align := $(subst -functions=0,,$(call cc-option,-falign-functions=0,-malign-functions=0)) cflags-$(CONFIG_M386) += -march=i386 cflags-$(CONFIG_M486) += -march=i486 cflags-$(CONFIG_M586) += -march=i586 cflags-$(CONFIG_M586TSC) += -march=i586 -cflags-$(CONFIG_M586MMX) += $(call check_gcc,-march=pentium-mmx,-march=i586) +cflags-$(CONFIG_M586MMX) += $(call cc-option,-march=pentium-mmx,-march=i586) cflags-$(CONFIG_M686) += -march=i686 -cflags-$(CONFIG_MPENTIUMII) += $(call check_gcc,-march=pentium2,-march=i686) -cflags-$(CONFIG_MPENTIUMIII) += $(call check_gcc,-march=pentium3,-march=i686) -cflags-$(CONFIG_MPENTIUMM) += $(call check_gcc,-march=pentium3,-march=i686) -cflags-$(CONFIG_MPENTIUM4) += $(call check_gcc,-march=pentium4,-march=i686) +cflags-$(CONFIG_MPENTIUMII) += $(call cc-option,-march=pentium2,-march=i686) +cflags-$(CONFIG_MPENTIUMIII) += $(call cc-option,-march=pentium3,-march=i686) +cflags-$(CONFIG_MPENTIUMM) += $(call cc-option,-march=pentium3,-march=i686) +cflags-$(CONFIG_MPENTIUM4) += $(call cc-option,-march=pentium4,-march=i686) cflags-$(CONFIG_MK6) += -march=k6 # Please note, that patches that add -march=athlon-xp and friends are pointless. # They make zero difference whatsosever to performance at this time. -cflags-$(CONFIG_MK7) += $(call check_gcc,-march=athlon,-march=i686 $(align)-functions=4) -cflags-$(CONFIG_MK8) += $(call check_gcc,-march=k8,$(call check_gcc,-march=athlon,-march=i686 $(align)-functions=4)) +cflags-$(CONFIG_MK7) += $(call cc-option,-march=athlon,-march=i686 $(align)-functions=4) +cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,$(call cc-option,-march=athlon,-march=i686 $(align)-functions=4)) cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0 -cflags-$(CONFIG_MWINCHIPC6) += $(call check_gcc,-march=winchip-c6,-march=i586) -cflags-$(CONFIG_MWINCHIP2) += $(call check_gcc,-march=winchip2,-march=i586) -cflags-$(CONFIG_MWINCHIP3D) += $(call check_gcc,-march=winchip2,-march=i586) -cflags-$(CONFIG_MCYRIXIII) += $(call check_gcc,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0 -cflags-$(CONFIG_MVIAC3_2) += $(call check_gcc,-march=c3-2,-march=i686) +cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586) +cflags-$(CONFIG_MWINCHIP2) += $(call cc-option,-march=winchip2,-march=i586) +cflags-$(CONFIG_MWINCHIP3D) += $(call cc-option,-march=winchip2,-march=i586) +cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0 +cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686) # AMD Elan support cflags-$(CONFIG_X86_ELAN) += -march=i486 @@ -60,7 +60,7 @@ cflags-$(CONFIG_REGPARM) += $(shell if [ $(GCC_VERSION) -ge 0300 ] ; then echo # Disable unit-at-a-time mode, it makes gcc use a lot more stack # due to the lack of sharing of stacklots. -CFLAGS += $(call check_gcc,-fno-unit-at-a-time,) +CFLAGS += $(call cc-option,-fno-unit-at-a-time,) CFLAGS += $(cflags-y) diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/Makefile b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/Makefile similarity index 97% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/Makefile rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/Makefile index dd230469d1..3124b25b99 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/Makefile +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/Makefile @@ -6,7 +6,7 @@ XENARCH := $(subst ",,$(CONFIG_XENARCH)) CFLAGS += -Iarch/$(XENARCH)/kernel -extra-y := head.o init_task.o vmlinux.lds.s +extra-y := head.o init_task.o vmlinux.lds obj-y := traps.o irq.o ldt.o setup.o entry.o time.o pci-dma.o process.o \ ioport.o signal.o i386_ksyms.o @@ -45,7 +45,7 @@ EXTRA_AFLAGS := -traditional c-obj-$(CONFIG_SCx200) += scx200.o -AFLAGS_vmlinux.lds.o += -U$(XENARCH) +CPPFLAGS_vmlinux.lds += -U$(XENARCH) # vsyscall.o contains the vsyscall DSO images as __initdata. # We must build both images before we can assemble it. diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/cpu/Makefile b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/Makefile similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/cpu/Makefile rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/Makefile diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/cpu/common.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/common.c similarity index 98% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/cpu/common.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/common.c index 83b293dcd5..a59d760eb7 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/cpu/common.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/common.c @@ -2,6 +2,8 @@ #include #include #include +#include +#include #include #include #include @@ -12,6 +14,9 @@ #include "cpu.h" +DEFINE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); +EXPORT_PER_CPU_SYMBOL(cpu_gdt_table); + static int cachesize_override __initdata = -1; static int disable_x86_fxsr __initdata = 0; static int disable_x86_serial_nr __initdata = 1; @@ -525,7 +530,7 @@ void __init cpu_gdt_init(struct Xgt_desc_struct *gdt_descr) void __init cpu_init (void) { int cpu = smp_processor_id(); - struct tss_struct * t = init_tss + cpu; + struct tss_struct * t = &per_cpu(init_tss, cpu); struct thread_struct *thread = ¤t->thread; if (test_and_set_bit(cpu, &cpu_initialized)) { diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/entry.S b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/entry.S rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/head.S b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/head.S similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/head.S rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/head.S diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c similarity index 91% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c index b598dcf360..83ef382e6c 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -32,6 +31,7 @@ #include #include #include +#include extern void dump_thread(struct pt_regs *, struct user *); extern spinlock_t rtc_lock; @@ -89,10 +89,10 @@ EXPORT_SYMBOL(get_cmos_time); EXPORT_SYMBOL(cpu_khz); EXPORT_SYMBOL(apm_info); -EXPORT_SYMBOL_NOVERS(__down_failed); -EXPORT_SYMBOL_NOVERS(__down_failed_interruptible); -EXPORT_SYMBOL_NOVERS(__down_failed_trylock); -EXPORT_SYMBOL_NOVERS(__up_wakeup); +EXPORT_SYMBOL(__down_failed); +EXPORT_SYMBOL(__down_failed_interruptible); +EXPORT_SYMBOL(__down_failed_trylock); +EXPORT_SYMBOL(__up_wakeup); /* Networking helper routines. */ EXPORT_SYMBOL(csum_partial_copy_generic); /* Delay loops */ @@ -101,9 +101,9 @@ EXPORT_SYMBOL(__udelay); EXPORT_SYMBOL(__delay); EXPORT_SYMBOL(__const_udelay); -EXPORT_SYMBOL_NOVERS(__get_user_1); -EXPORT_SYMBOL_NOVERS(__get_user_2); -EXPORT_SYMBOL_NOVERS(__get_user_4); +EXPORT_SYMBOL(__get_user_1); +EXPORT_SYMBOL(__get_user_2); +EXPORT_SYMBOL(__get_user_4); EXPORT_SYMBOL(strpbrk); EXPORT_SYMBOL(strstr); @@ -144,8 +144,8 @@ EXPORT_SYMBOL(cpu_sibling_map); EXPORT_SYMBOL(cpu_data); EXPORT_SYMBOL(cpu_online_map); EXPORT_SYMBOL(cpu_callout_map); -EXPORT_SYMBOL_NOVERS(__write_lock_failed); -EXPORT_SYMBOL_NOVERS(__read_lock_failed); +EXPORT_SYMBOL(__write_lock_failed); +EXPORT_SYMBOL(__read_lock_failed); /* Global SMP stuff */ EXPORT_SYMBOL(synchronize_irq); @@ -177,8 +177,9 @@ EXPORT_SYMBOL_GPL(unset_nmi_callback); #undef memcmp extern int memcmp(const void *,const void *,__kernel_size_t); -EXPORT_SYMBOL_NOVERS(memcmp); +EXPORT_SYMBOL(memcmp); +EXPORT_SYMBOL(register_die_notifier); #ifdef CONFIG_HAVE_DEC_LOCK EXPORT_SYMBOL(atomic_dec_and_lock); #endif diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/ioport.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ioport.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/ioport.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ioport.c diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/irq.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/irq.c similarity index 96% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/irq.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/irq.c index 758245e28e..c23ea80fb5 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/irq.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/irq.c @@ -220,14 +220,16 @@ asmlinkage int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, struct irqaction *action) { int status = 1; /* Force the "do bottom halves" bit */ - int retval = 0; + int ret, retval = 0; if (!(action->flags & SA_INTERRUPT)) local_irq_enable(); do { - status |= action->flags; - retval |= action->handler(irq, action->dev_id, regs); + ret = action->handler(irq, action->dev_id, regs); + if (ret == IRQ_HANDLED) + status |= action->flags; + retval |= ret; action = action->next; } while (action); if (status & SA_SAMPLE_RANDOM) @@ -1028,32 +1030,6 @@ static int irq_affinity_write_proc(struct file *file, const char __user *buffer, } #endif - -static int prof_cpu_mask_read_proc (char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - int len = cpumask_scnprintf(page, count, *(cpumask_t *)data); - if (count - len < 2) - return -EINVAL; - len += sprintf(page + len, "\n"); - return len; -} - -static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffer, - unsigned long count, void *data) -{ - cpumask_t *mask = (cpumask_t *)data; - unsigned long full_count = count, err; - cpumask_t new_value; - - err = cpumask_parse(buffer, count, new_value); - if (err) - return err; - - *mask = new_value; - return full_count; -} - #define MAX_NAMELEN 10 static void register_irq_proc (unsigned int irq) @@ -1089,27 +1065,13 @@ static void register_irq_proc (unsigned int irq) #endif } -unsigned long prof_cpu_mask = -1; - void init_irq_proc (void) { - struct proc_dir_entry *entry; int i; /* create /proc/irq */ root_irq_dir = proc_mkdir("irq", NULL); - - /* create /proc/irq/prof_cpu_mask */ - entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir); - - if (!entry) - return; - - entry->nlink = 1; - entry->data = (void *)&prof_cpu_mask; - entry->read_proc = prof_cpu_mask_read_proc; - entry->write_proc = prof_cpu_mask_write_proc; - + create_prof_cpu_mask(root_irq_dir); /* * Create entries for all existing IRQs. */ diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/ldt.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ldt.c similarity index 97% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/ldt.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ldt.c index 4dd697384c..1a762ce99b 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/ldt.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ldt.c @@ -157,12 +157,17 @@ static int read_ldt(void __user * ptr, unsigned long bytecount) err = -EFAULT; up(&mm->context.sem); if (err < 0) - return err; + goto error_return; if (size != bytecount) { /* zero-fill the rest */ - clear_user(ptr+size, bytecount-size); + if (clear_user(ptr+size, bytecount-size) != 0) { + err = -EFAULT; + goto error_return; + } } return bytecount; +error_return: + return err; } static int read_default_ldt(void __user * ptr, unsigned long bytecount) diff --git a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/pci-dma.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/pci-dma.c new file mode 100644 index 0000000000..49a58006fb --- /dev/null +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/pci-dma.c @@ -0,0 +1,218 @@ +/* + * Dynamic DMA mapping support. + * + * On i386 there is no hardware dynamic DMA address translation, + * so consistent alloc/free are merely page allocation/freeing. + * The rest of the dynamic DMA mapping interface is implemented + * in asm/pci.h. + */ + +#include +#include +#include +#include +#include +#include + +struct dma_coherent_mem { + void *virt_base; + u32 device_base; + int size; + int flags; + unsigned long *bitmap; +}; + +void +dma_contig_memory(unsigned long vstart, unsigned int order) +{ + /* + * Ensure multi-page extents are contiguous in machine memory. + * This code could be cleaned up some, and the number of + * hypercalls reduced. + */ + pgd_t *pgd; + pmd_t *pmd; + pte_t *pte; + unsigned long pfn, i; + + scrub_pages(vstart, 1 << order); + /* 1. Zap current PTEs, giving away the underlying pages. */ + for (i = 0; i < (1<pte_low >> PAGE_SHIFT; + queue_l1_entry_update(pte, 0); + phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] = + INVALID_P2M_ENTRY; + flush_page_update_queue(); + if (HYPERVISOR_dom_mem_op(MEMOP_decrease_reservation, + &pfn, 1, 0) != 1) BUG(); + } + /* 2. Get a new contiguous memory extent. */ + if (HYPERVISOR_dom_mem_op(MEMOP_increase_reservation, + &pfn, 1, order) != 1) BUG(); + /* 3. Map the new extent in place of old pages. */ + for (i = 0; i < (1<>PAGE_SHIFT)+i); + phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] = + pfn+i; + } + /* Flush updates through and flush the TLB. */ + xen_tlb_flush(); +} + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) +#define pte_offset_kernel pte_offset +void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, + dma_addr_t *dma_handle) +#else +void *dma_alloc_coherent(struct device *dev, size_t size, + dma_addr_t *dma_handle, int gfp) +#endif +{ + void *ret; + unsigned int order = get_order(size); + unsigned long vstart; + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) + int gfp = GFP_ATOMIC; + + if (hwdev == NULL || ((u32)hwdev->dma_mask < 0xffffffff)) + gfp |= GFP_DMA; +#else + struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL; + + /* ignore region specifiers */ + gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); + + if (mem) { + int page = bitmap_find_free_region(mem->bitmap, mem->size, + order); + if (page >= 0) { + *dma_handle = mem->device_base + (page << PAGE_SHIFT); + ret = mem->virt_base + (page << PAGE_SHIFT); + memset(ret, 0, size); + return ret; + } + if (mem->flags & DMA_MEMORY_EXCLUSIVE) + return NULL; + } + + if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff)) + gfp |= GFP_DMA; +#endif + + vstart = __get_free_pages(gfp, order); + ret = (void *)vstart; + if (ret == NULL) + return ret; + + dma_contig_memory(vstart, order); + + memset(ret, 0, size); + *dma_handle = virt_to_bus(ret); + + return ret; +} + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) +void pci_free_consistent(struct pci_dev *hwdev, size_t size, + void *vaddr, dma_addr_t dma_handle) +#else +void dma_free_coherent(struct device *dev, size_t size, + void *vaddr, dma_addr_t dma_handle) +#endif +{ + struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL; + int order = get_order(size); + + if (mem && vaddr >= mem->virt_base && vaddr < (mem->virt_base + (mem->size << PAGE_SHIFT))) { + int page = (vaddr - mem->virt_base) >> PAGE_SHIFT; + + bitmap_release_region(mem->bitmap, page, order); + } else + free_pages((unsigned long)vaddr, order); +} + +int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, + dma_addr_t device_addr, size_t size, int flags) +{ + void __iomem *mem_base; + int pages = size >> PAGE_SHIFT; + int bitmap_size = (pages + 31)/32; + + if ((flags & (DMA_MEMORY_MAP | DMA_MEMORY_IO)) == 0) + goto out; + if (!size) + goto out; + if (dev->dma_mem) + goto out; + + /* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */ + + mem_base = ioremap(bus_addr, size); + if (!mem_base) + goto out; + + dev->dma_mem = kmalloc(GFP_KERNEL, sizeof(struct dma_coherent_mem)); + if (!dev->dma_mem) + goto out; + memset(dev->dma_mem, 0, sizeof(struct dma_coherent_mem)); + dev->dma_mem->bitmap = kmalloc(GFP_KERNEL, bitmap_size); + if (!dev->dma_mem->bitmap) + goto free1_out; + memset(dev->dma_mem->bitmap, 0, bitmap_size); + + dev->dma_mem->virt_base = mem_base; + dev->dma_mem->device_base = device_addr; + dev->dma_mem->size = pages; + dev->dma_mem->flags = flags; + + if (flags & DMA_MEMORY_MAP) + return DMA_MEMORY_MAP; + + return DMA_MEMORY_IO; + + free1_out: + kfree(dev->dma_mem->bitmap); + out: + return 0; +} +EXPORT_SYMBOL(dma_declare_coherent_memory); + +void dma_release_declared_memory(struct device *dev) +{ + struct dma_coherent_mem *mem = dev->dma_mem; + + if(!mem) + return; + dev->dma_mem = NULL; + kfree(mem->bitmap); + kfree(mem); +} +EXPORT_SYMBOL(dma_release_declared_memory); + +void *dma_mark_declared_memory_occupied(struct device *dev, + dma_addr_t device_addr, size_t size) +{ + struct dma_coherent_mem *mem = dev->dma_mem; + int pages = (size + (device_addr & ~PAGE_MASK) + PAGE_SIZE - 1) >> PAGE_SHIFT; + int pos, err; + + if (!mem) + return ERR_PTR(-EINVAL); + + pos = (device_addr - mem->device_base) >> PAGE_SHIFT; + err = bitmap_allocate_region(mem->bitmap, pos, get_order(pages)); + if (err != 0) + return ERR_PTR(err); + return mem->virt_base + (pos << PAGE_SHIFT); +} +EXPORT_SYMBOL(dma_mark_declared_memory_occupied); diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/process.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/process.c similarity index 90% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/process.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/process.c index ee7be2bd5c..930e9151a3 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/process.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/process.c @@ -144,13 +144,21 @@ void cpu_idle (void) /* endless idle loop with no priority at all */ while (1) { while (!need_resched()) { - void (*idle)(void) = pm_idle; + void (*idle)(void); + /* + * Mark this as an RCU critical section so that + * synchronize_kernel() in the unload path waits + * for our completion. + */ + rcu_read_lock(); + idle = pm_idle; if (!idle) idle = default_idle; irq_stat[smp_processor_id()].idle_timestamp = jiffies; idle(); + rcu_read_unlock(); } schedule(); } @@ -185,19 +193,13 @@ void __init select_idle_routine(const struct cpuinfo_x86 *c) printk("monitor/mwait feature present.\n"); /* * Skip, if setup has overridden idle. - * Also, take care of system with asymmetric CPUs. - * Use, mwait_idle only if all cpus support it. - * If not, we fallback to default_idle() + * One CPU supports mwait => All CPUs supports mwait */ if (!pm_idle) { printk("using mwait in idle threads.\n"); pm_idle = mwait_idle; } - return; } - if (!pm_idle) - pm_idle = default_idle; - return; } static int __init idle_setup (char *str) @@ -284,13 +286,22 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) void exit_thread(void) { struct task_struct *tsk = current; + struct thread_struct *t = &tsk->thread; /* The process may have allocated an io port bitmap... nuke it. */ - if (unlikely(NULL != tsk->thread.io_bitmap_ptr)) { + if (unlikely(NULL != t->io_bitmap_ptr)) { int cpu = get_cpu(); - struct tss_struct *tss = init_tss + cpu; - kfree(tsk->thread.io_bitmap_ptr); - tsk->thread.io_bitmap_ptr = NULL; + struct tss_struct *tss = &per_cpu(init_tss, cpu); + + kfree(t->io_bitmap_ptr); + t->io_bitmap_ptr = NULL; + /* + * Careful, clear this in the TSS too: + */ + memset(tss->io_bitmap, 0xff, tss->io_bitmap_max); + t->io_bitmap_max = 0; + tss->io_bitmap_owner = NULL; + tss->io_bitmap_max = 0; tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET; put_cpu(); } @@ -360,8 +371,10 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, tsk = current; if (unlikely(NULL != tsk->thread.io_bitmap_ptr)) { p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL); - if (!p->thread.io_bitmap_ptr) + if (!p->thread.io_bitmap_ptr) { + p->thread.io_bitmap_max = 0; return -ENOMEM; + } memcpy(p->thread.io_bitmap_ptr, tsk->thread.io_bitmap_ptr, IO_BITMAP_BYTES); } @@ -396,8 +409,10 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp, err = 0; out: - if (err && p->thread.io_bitmap_ptr) + if (err && p->thread.io_bitmap_ptr) { kfree(p->thread.io_bitmap_ptr); + p->thread.io_bitmap_max = 0; + } return err; } @@ -462,6 +477,37 @@ int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) return 1; } +static inline void +handle_io_bitmap(struct thread_struct *next, struct tss_struct *tss) +{ + if (!next->io_bitmap_ptr) { + /* + * Disable the bitmap via an invalid offset. We still cache + * the previous bitmap owner and the IO bitmap contents: + */ + tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET; + return; + } + if (likely(next == tss->io_bitmap_owner)) { + /* + * Previous owner of the bitmap (hence the bitmap content) + * matches the next task, we dont have to do anything but + * to set a valid offset in the TSS: + */ + tss->io_bitmap_base = IO_BITMAP_OFFSET; + return; + } + /* + * Lazy TSS's I/O bitmap copy. We set an invalid offset here + * and we let the task to get a GPF in case an I/O instruction + * is performed. The handler of the GPF will verify that the + * faulting task has a valid I/O bitmap and, it true, does the + * real copy and restart the instruction. This will save us + * redundant copies when the currently switched task does not + * perform any I/O during its timeslice. + */ + tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET_LAZY; +} /* * This special macro can be used to load a debugging register */ @@ -501,7 +547,7 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas struct thread_struct *prev = &prev_p->thread, *next = &next_p->thread; int cpu = smp_processor_id(); - struct tss_struct *tss = init_tss + cpu; + struct tss_struct *tss = &per_cpu(init_tss, cpu); dom0_op_t op; /* NB. No need to disable interrupts as already done in sched.c */ @@ -600,28 +646,9 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas loaddebug(next, 7); } - if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr)) { - if (next->io_bitmap_ptr) { - /* - * 4 cachelines copy ... not good, but not that - * bad either. Anyone got something better? - * This only affects processes which use ioperm(). - * [Putting the TSSs into 4k-tlb mapped regions - * and playing VM tricks to switch the IO bitmap - * is not really acceptable.] - */ - memcpy(tss->io_bitmap, next->io_bitmap_ptr, - IO_BITMAP_BYTES); - tss->io_bitmap_base = IO_BITMAP_OFFSET; - } else - /* - * a bitmap offset pointing outside of the TSS limit - * causes a nicely controllable SIGSEGV if a process - * tries to use a port IO instruction. The first - * sys_ioperm() call sets up the bitmap properly. - */ - tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET; - } + if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr)) + handle_io_bitmap(next, tss); + return prev_p; } @@ -642,7 +669,7 @@ asmlinkage int sys_clone(struct pt_regs regs) child_tidptr = (int __user *)regs.edi; if (!newsp) newsp = regs.esp; - return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, ®s, 0, parent_tidptr, child_tidptr); + return do_fork(clone_flags, newsp, ®s, 0, parent_tidptr, child_tidptr); } /* diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/setup.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/setup.c similarity index 97% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/setup.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/setup.c index 5b1aec8b9d..68a8f46b09 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/setup.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/setup.c @@ -50,6 +50,7 @@ #include #include #include "setup_arch_pre.h" +#include int disable_pse __initdata = 0; @@ -216,9 +217,14 @@ static struct resource standard_io_resources[] = { { .end = 0x0021, .flags = IORESOURCE_BUSY | IORESOURCE_IO }, { - .name = "timer", + .name = "timer0", .start = 0x0040, - .end = 0x005f, + .end = 0x0043, + .flags = IORESOURCE_BUSY | IORESOURCE_IO +}, { + .name = "timer1", + .start = 0x0050, + .end = 0x0053, .flags = IORESOURCE_BUSY | IORESOURCE_IO }, { .name = "keyboard", @@ -830,6 +836,14 @@ static void __init parse_cmdline_early (char ** cmdline_p) if (c == ' ' && !memcmp(from, "highmem=", 8)) highmem_pages = memparse(from+8, &from) >> PAGE_SHIFT; + /* + * vmalloc=size forces the vmalloc area to be exactly 'size' + * bytes. This can be used to increase (or decrease) the + * vmalloc area - the default is 128m. + */ + if (c == ' ' && !memcmp(from, "vmalloc=", 8)) + __VMALLOC_RESERVE = memparse(from+8, &from); + c = *(from++); if (!c) break; @@ -1012,6 +1026,17 @@ static void __init register_bootmem_low_pages(unsigned long max_low_pfn) } } +/* + * workaround for Dell systems that neglect to reserve EBDA + */ +static void __init reserve_ebda_region(void) +{ + unsigned int addr; + addr = get_bios_ebda(); + if (addr) + reserve_bootmem(addr, PAGE_SIZE); +} + static unsigned long __init setup_memory(void) { unsigned long bootmap_size, start_pfn, max_low_pfn; @@ -1052,6 +1077,9 @@ static unsigned long __init setup_memory(void) reserve_bootmem(HIGH_MEMORY, (PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1) - (HIGH_MEMORY)); + /* reserve EBDA region, it's a 4K region */ + reserve_ebda_region(); + /* could be an AMD 768MPX chipset. Reserve a page before VGA to prevent PCI prefetch into it (errata #56). Usually the page is reserved anyways, unless you have no PS/2 mouse plugged in. */ @@ -1371,7 +1399,12 @@ void __init setup_arch(char **cmdline_p) /* * NOTE: before this point _nobody_ is allowed to allocate - * any memory using the bootmem allocator. + * any memory using the bootmem allocator. Although the + * alloctor is now initialised only the first 8Mb of the kernel + * virtual address space has been mapped. All allocations before + * paging_init() has completed must use the alloc_bootmem_low_pages() + * variant (which allocates DMA'able memory) and care must be taken + * not to exceed the 8Mb limit. */ #ifdef CONFIG_SMP @@ -1389,6 +1422,10 @@ void __init setup_arch(char **cmdline_p) virt_to_machine(pfn_to_mfn_frame_list) >> PAGE_SHIFT; + /* + * NOTE: at this point the bootmem allocator is fully available. + */ + #ifdef CONFIG_EARLY_PRINTK { char *s = strstr(*cmdline_p, "earlyprintk="); diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/signal.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/signal.c similarity index 91% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/signal.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/signal.c index a8debd478e..4c264706cf 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/signal.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/signal.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -269,6 +270,7 @@ setup_sigcontext(struct sigcontext __user *sc, struct _fpstate __user *fpstate, struct pt_regs *regs, unsigned long mask) { int tmp, err = 0; + unsigned long eflags; tmp = 0; __asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp)); @@ -290,7 +292,11 @@ setup_sigcontext(struct sigcontext __user *sc, struct _fpstate __user *fpstate, err |= __put_user(current->thread.error_code, &sc->err); err |= __put_user(regs->eip, &sc->eip); err |= __put_user(regs->xcs, (unsigned int __user *)&sc->cs); - err |= __put_user(regs->eflags, &sc->eflags); + eflags = regs->eflags; + if (current->ptrace & PT_PTRACED) { + eflags &= ~TF_MASK; + } + err |= __put_user(eflags, &sc->eflags); err |= __put_user(regs->esp, &sc->esp_at_signal); err |= __put_user(regs->xss, (unsigned int __user *)&sc->ss); @@ -345,18 +351,20 @@ static void setup_frame(int sig, struct k_sigaction *ka, void __user *restorer; struct sigframe __user *frame; int err = 0; + int usig; frame = get_sigframe(ka, regs, sizeof(*frame)); if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) goto give_sigsegv; - err |= __put_user((current_thread_info()->exec_domain - && current_thread_info()->exec_domain->signal_invmap - && sig < 32 - ? current_thread_info()->exec_domain->signal_invmap[sig] - : sig), - &frame->sig); + usig = current_thread_info()->exec_domain + && current_thread_info()->exec_domain->signal_invmap + && sig < 32 + ? current_thread_info()->exec_domain->signal_invmap[sig] + : sig; + + err |= __put_user(usig, &frame->sig); if (err) goto give_sigsegv; @@ -395,13 +403,22 @@ static void setup_frame(int sig, struct k_sigaction *ka, /* Set up registers for signal handler */ regs->esp = (unsigned long) frame; regs->eip = (unsigned long) ka->sa.sa_handler; + regs->eax = (unsigned long) sig; + regs->edx = (unsigned long) 0; + regs->ecx = (unsigned long) 0; set_fs(USER_DS); regs->xds = __USER_DS; regs->xes = __USER_DS; regs->xss = __USER_DS; regs->xcs = __USER_CS; - regs->eflags &= ~TF_MASK; + if (regs->eflags & TF_MASK) { + if (current->ptrace & PT_PTRACED) { + ptrace_notify(SIGTRAP); + } else { + regs->eflags &= ~TF_MASK; + } + } #if DEBUG_SIG printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n", @@ -411,9 +428,7 @@ static void setup_frame(int sig, struct k_sigaction *ka, return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, @@ -422,18 +437,20 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, void __user *restorer; struct rt_sigframe __user *frame; int err = 0; + int usig; frame = get_sigframe(ka, regs, sizeof(*frame)); if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) goto give_sigsegv; - err |= __put_user((current_thread_info()->exec_domain - && current_thread_info()->exec_domain->signal_invmap - && sig < 32 - ? current_thread_info()->exec_domain->signal_invmap[sig] - : sig), - &frame->sig); + usig = current_thread_info()->exec_domain + && current_thread_info()->exec_domain->signal_invmap + && sig < 32 + ? current_thread_info()->exec_domain->signal_invmap[sig] + : sig; + + err |= __put_user(usig, &frame->sig); err |= __put_user(&frame->info, &frame->pinfo); err |= __put_user(&frame->uc, &frame->puc); err |= copy_siginfo_to_user(&frame->info, info); @@ -476,13 +493,22 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, /* Set up registers for signal handler */ regs->esp = (unsigned long) frame; regs->eip = (unsigned long) ka->sa.sa_handler; + regs->eax = (unsigned long) usig; + regs->edx = (unsigned long) &frame->info; + regs->ecx = (unsigned long) &frame->uc; set_fs(USER_DS); regs->xds = __USER_DS; regs->xes = __USER_DS; regs->xss = __USER_DS; regs->xcs = __USER_CS; - regs->eflags &= ~TF_MASK; + if (regs->eflags & TF_MASK) { + if (current->ptrace & PT_PTRACED) { + ptrace_notify(SIGTRAP); + } else { + regs->eflags &= ~TF_MASK; + } + } #if DEBUG_SIG printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n", @@ -492,9 +518,7 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } /* @@ -502,11 +526,9 @@ give_sigsegv: */ static void -handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, - struct pt_regs * regs) +handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, + sigset_t *oldset, struct pt_regs * regs) { - struct k_sigaction *ka = ¤t->sighand->action[sig-1]; - /* Are we from a system call? */ if (regs->orig_eax >= 0) { /* If so, check system call restarting.. */ @@ -534,9 +556,6 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, else setup_frame(sig, ka, oldset, regs); - if (ka->sa.sa_flags & SA_ONESHOT) - ka->sa.sa_handler = SIG_DFL; - if (!(ka->sa.sa_flags & SA_NODEFER)) { spin_lock_irq(¤t->sighand->siglock); sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); @@ -555,6 +574,7 @@ int fastcall do_signal(struct pt_regs *regs, sigset_t *oldset) { siginfo_t info; int signr; + struct k_sigaction ka; /* * We want the common case to go fast, which @@ -573,7 +593,7 @@ int fastcall do_signal(struct pt_regs *regs, sigset_t *oldset) if (!oldset) oldset = ¤t->blocked; - signr = get_signal_to_deliver(&info, regs, NULL); + signr = get_signal_to_deliver(&info, &ka, regs, NULL); if (signr > 0) { /* Reenable any watchpoints before delivering the * signal to user space. The processor register will @@ -585,7 +605,7 @@ int fastcall do_signal(struct pt_regs *regs, sigset_t *oldset) current->thread.debugreg[7]); /* Whee! Actually deliver the signal. */ - handle_signal(signr, &info, oldset, regs); + handle_signal(signr, &info, &ka, oldset, regs); return 1; } diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/sysenter.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/sysenter.c similarity index 91% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/sysenter.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/sysenter.c index f8b056fbb1..93bdc0fe8c 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/sysenter.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/sysenter.c @@ -24,7 +24,7 @@ extern asmlinkage void sysenter_entry(void); void enable_sep_cpu(void *info) { int cpu = get_cpu(); - struct tss_struct *tss = init_tss + cpu; + struct tss_struct *tss = &per_cpu(init_tss, cpu); tss->ss1 = __KERNEL_CS; tss->esp1 = sizeof(struct tss_struct) + (unsigned long) tss; @@ -43,18 +43,18 @@ extern const char vsyscall_sysenter_start, vsyscall_sysenter_end; static int __init sysenter_setup(void) { - unsigned long page = get_zeroed_page(GFP_ATOMIC); + void *page = (void *)get_zeroed_page(GFP_ATOMIC); __set_fixmap(FIX_VSYSCALL, __pa(page), PAGE_READONLY_EXEC); if (1 /* XXXcl not yet */ || !boot_cpu_has(X86_FEATURE_SEP)) { - memcpy((void *) page, + memcpy(page, &vsyscall_int80_start, &vsyscall_int80_end - &vsyscall_int80_start); return 0; } - memcpy((void *) page, + memcpy(page, &vsyscall_sysenter_start, &vsyscall_sysenter_end - &vsyscall_sysenter_start); diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c similarity index 97% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c index 15b68ba45d..15bc102ce6 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c @@ -355,6 +355,18 @@ unsigned long long monotonic_clock(void) } EXPORT_SYMBOL(monotonic_clock); +#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) +unsigned long profile_pc(struct pt_regs *regs) +{ + unsigned long pc = instruction_pointer(regs); + + if (in_lock_functions(pc)) + return *(unsigned long *)(regs->ebp + 4); + + return pc; +} +EXPORT_SYMBOL(profile_pc); +#endif /* * timer_interrupt() needs to keep up the real-time clock, @@ -533,11 +545,12 @@ static int __time_suspend(struct sys_device *dev, u32 state) static int __time_resume(struct sys_device *dev) { + unsigned long flags; unsigned long sec = get_cmos_time() + clock_cmos_diff; - write_seqlock_irq(&xtime_lock); + write_seqlock_irqsave(&xtime_lock, flags); xtime.tv_sec = sec; xtime.tv_nsec = 0; - write_sequnlock_irq(&xtime_lock); + write_sequnlock_irqrestore(&xtime_lock, flags); return 0; } diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/timers/Makefile b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/Makefile similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/timers/Makefile rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/Makefile diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c similarity index 98% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c index 7348d2a081..683ad982ca 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c @@ -274,7 +274,8 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, { struct cpufreq_freqs *freq = data; - write_seqlock_irq(&xtime_lock); + if (val != CPUFREQ_RESUMECHANGE) + write_seqlock_irq(&xtime_lock); if (!ref_freq) { ref_freq = freq->old; loops_per_jiffy_ref = cpu_data[freq->cpu].loops_per_jiffy; @@ -300,7 +301,9 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, } #endif } - write_sequnlock_irq(&xtime_lock); + + if (val != CPUFREQ_RESUMECHANGE) + write_sequnlock_irq(&xtime_lock); return 0; } diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/traps.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/traps.c similarity index 88% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/traps.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/traps.c index 2f3529b759..dd1c42b840 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/traps.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/traps.c @@ -26,6 +26,7 @@ #include #include #include +#include #ifdef CONFIG_EISA #include @@ -48,6 +49,7 @@ #include #include +#include #include #include @@ -92,6 +94,18 @@ asmlinkage void fixup_4gb_segment(void); asmlinkage void machine_check(void); static int kstack_depth_to_print = 24; +struct notifier_block *i386die_chain; +static spinlock_t die_notifier_lock = SPIN_LOCK_UNLOCKED; + +int register_die_notifier(struct notifier_block *nb) +{ + int err = 0; + unsigned long flags; + spin_lock_irqsave(&die_notifier_lock, flags); + err = notifier_chain_register(&i386die_chain, nb); + spin_unlock_irqrestore(&die_notifier_lock, flags); + return err; +} static int valid_stack_ptr(struct task_struct *task, void *p) { @@ -216,7 +230,7 @@ void show_registers(struct pt_regs *regs) ss = regs->xss & 0xffff; } print_modules(); - printk("CPU: %d\nEIP: %04x:[<%08lx>] %s\nEFLAGS: %08lx" + printk("CPU: %d\nEIP: %04x:[<%08lx>] %s VLI\nEFLAGS: %08lx" " (%s) \n", smp_processor_id(), 0xffff & regs->xcs, regs->eip, print_tainted(), regs->eflags, UTS_RELEASE); @@ -234,23 +248,25 @@ void show_registers(struct pt_regs *regs) * time of the fault.. */ if (in_kernel) { + u8 *eip; printk("\nStack: "); show_stack(NULL, (unsigned long*)esp); printk("Code: "); - if(regs->eip < PAGE_OFFSET) - goto bad; - for(i=0;i<20;i++) - { + eip = (u8 *)regs->eip - 43; + for (i = 0; i < 64; i++, eip++) { unsigned char c; - if(__get_user(c, &((unsigned char*)regs->eip)[i])) { -bad: + + if (eip < (u8 *)PAGE_OFFSET || __get_user(c, eip)) { printk(" Bad EIP value."); break; } - printk("%02x ", c); + if (eip == (u8 *)regs->eip) + printk("<%02x> ", c); + else + printk("%02x ", c); } } printk("\n"); @@ -292,35 +308,53 @@ bug: printk("Kernel BUG\n"); } -spinlock_t die_lock = SPIN_LOCK_UNLOCKED; - void die(const char * str, struct pt_regs * regs, long err) { + static struct { + spinlock_t lock; + u32 lock_owner; + int lock_owner_depth; + } die = { + .lock = SPIN_LOCK_UNLOCKED, + .lock_owner = -1, + .lock_owner_depth = 0 + }; static int die_counter; - int nl = 0; - console_verbose(); - spin_lock_irq(&die_lock); - bust_spinlocks(1); - handle_BUG(regs); - printk(KERN_ALERT "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); + if (die.lock_owner != smp_processor_id()) { + console_verbose(); + spin_lock_irq(&die.lock); + die.lock_owner = smp_processor_id(); + die.lock_owner_depth = 0; + bust_spinlocks(1); + } + + if (++die.lock_owner_depth < 3) { + int nl = 0; + handle_BUG(regs); + printk(KERN_ALERT "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); #ifdef CONFIG_PREEMPT - printk("PREEMPT "); - nl = 1; + printk("PREEMPT "); + nl = 1; #endif #ifdef CONFIG_SMP - printk("SMP "); - nl = 1; + printk("SMP "); + nl = 1; #endif #ifdef CONFIG_DEBUG_PAGEALLOC - printk("DEBUG_PAGEALLOC"); - nl = 1; + printk("DEBUG_PAGEALLOC"); + nl = 1; #endif - if (nl) - printk("\n"); - show_registers(regs); + if (nl) + printk("\n"); + notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV); + show_registers(regs); + } else + printk(KERN_ERR "Recursive die() failure, output suppressed\n"); + bust_spinlocks(0); - spin_unlock_irq(&die_lock); + die.lock_owner = -1; + spin_unlock_irq(&die.lock); if (in_interrupt()) panic("Fatal exception in interrupt"); @@ -387,6 +421,9 @@ static inline void do_trap(int trapnr, int signr, char *str, int vm86, #define DO_ERROR(trapnr, signr, str, name) \ asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ { \ + if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ + == NOTIFY_STOP) \ + return; \ do_trap(trapnr, signr, str, 0, regs, error_code, NULL); \ } @@ -398,12 +435,18 @@ asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ info.si_errno = 0; \ info.si_code = sicode; \ info.si_addr = (void __user *)siaddr; \ + if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ + == NOTIFY_STOP) \ + return; \ do_trap(trapnr, signr, str, 0, regs, error_code, &info); \ } #define DO_VM86_ERROR(trapnr, signr, str, name) \ asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ { \ + if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ + == NOTIFY_STOP) \ + return; \ do_trap(trapnr, signr, str, 1, regs, error_code, NULL); \ } @@ -415,11 +458,16 @@ asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ info.si_errno = 0; \ info.si_code = sicode; \ info.si_addr = (void __user *)siaddr; \ + if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ + == NOTIFY_STOP) \ + return; \ do_trap(trapnr, signr, str, 1, regs, error_code, &info); \ } DO_VM86_ERROR_INFO( 0, SIGFPE, "divide error", divide_error, FPE_INTDIV, regs->eip) +#ifndef CONFIG_KPROBES DO_VM86_ERROR( 3, SIGTRAP, "int3", int3) +#endif DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow) DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds) DO_ERROR_INFO( 6, SIGILL, "invalid operand", invalid_op, ILL_ILLOPN, regs->eip) @@ -457,11 +505,6 @@ asmlinkage void do_general_protection(struct pt_regs * regs, long error_code) } } -#if 0 - if (regs->eflags & X86_EFLAGS_IF) - local_irq_enable(); -#endif - if (regs->eflags & VM_MASK) goto gp_in_vm86; @@ -479,8 +522,12 @@ gp_in_vm86: return; gp_in_kernel: - if (!fixup_exception(regs)) + if (!fixup_exception(regs)) { + if (notify_die(DIE_GPF, "general protection fault", regs, + error_code, 13, SIGSEGV) == NOTIFY_STOP); + return; die("general protection fault", regs, error_code); + } } static void mem_parity_error(unsigned char reason, struct pt_regs * regs) @@ -524,11 +571,35 @@ static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs) printk("Do you have a strange power saving mode enabled?\n"); } +static spinlock_t nmi_print_lock = SPIN_LOCK_UNLOCKED; + +void die_nmi (struct pt_regs *regs, const char *msg) +{ + spin_lock(&nmi_print_lock); + /* + * We are in trouble anyway, lets at least try + * to get a message out. + */ + bust_spinlocks(1); + printk(msg); + printk(" on CPU%d, eip %08lx, registers:\n", + smp_processor_id(), regs->eip); + show_registers(regs); + printk("console shuts up ...\n"); + console_silent(); + spin_unlock(&nmi_print_lock); + bust_spinlocks(0); + do_exit(SIGSEGV); +} + static void default_do_nmi(struct pt_regs * regs) { unsigned char reason = get_nmi_reason(); if (!(reason & 0xc0)) { + if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 0, SIGINT) + == NOTIFY_STOP) + return; #ifdef CONFIG_X86_LOCAL_APIC /* * Ok, so this is none of the documented NMI sources, @@ -542,6 +613,8 @@ static void default_do_nmi(struct pt_regs * regs) unknown_nmi_error(reason, regs); return; } + if (notify_die(DIE_NMI, "nmi", regs, reason, 0, SIGINT) == NOTIFY_STOP) + return; if (reason & 0x80) mem_parity_error(reason, regs); if (reason & 0x40) @@ -585,6 +658,20 @@ void unset_nmi_callback(void) nmi_callback = dummy_nmi_callback; } +#ifdef CONFIG_KPROBES +asmlinkage int do_int3(struct pt_regs *regs, long error_code) +{ + if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) + == NOTIFY_STOP) + return 1; + /* This is an interrupt gate, because kprobes wants interrupts + disabled. Normal trap handlers don't. */ + restore_interrupts(regs); + do_trap(3, SIGTRAP, "int3", 1, regs, error_code, NULL); + return 0; +} +#endif + /* * Our handling of the processor debug registers is non-trivial. * We do not clear them on entry and exit from the kernel. Therefore @@ -615,6 +702,9 @@ asmlinkage void do_debug(struct pt_regs * regs, long error_code) condition = HYPERVISOR_get_debugreg(6); + if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code, + SIGTRAP) == NOTIFY_STOP) + return; #if 0 /* It's safe to allow irq's after DR6 has been saved */ if (regs->eflags & X86_EFLAGS_IF) @@ -903,6 +993,14 @@ void set_intr_gate(unsigned int n, void *addr) } #if 0 +/* + * This routine sets up an interrupt gate at directory privilege level 3. + */ +static inline void set_system_intr_gate(unsigned int n, void *addr) +{ + _set_gate(idt_table+n, 14, 3, addr, __KERNEL_CS); +} + static void __init set_trap_gate(unsigned int n, void *addr) { _set_gate(idt_table+n,15,0,addr,__KERNEL_CS); diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/vsyscall.S b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vsyscall.S similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/vsyscall.S rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vsyscall.S diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/vsyscall.lds b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vsyscall.lds similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/vsyscall.lds rename to linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vsyscall.lds diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/Makefile b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/Makefile similarity index 85% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/Makefile rename to linux-2.6.9-xen-sparse/arch/xen/i386/mm/Makefile index 50c97507c2..016d205d60 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/Makefile +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/Makefile @@ -6,8 +6,8 @@ XENARCH := $(subst ",,$(CONFIG_XENARCH)) CFLAGS += -Iarch/$(XENARCH)/mm -obj-y := init.o fault.o ioremap.o pgtable.o hypervisor.o pageattr.o -c-obj-y := extable.o +obj-y := init.o pgtable.o fault.o ioremap.o pageattr.o hypervisor.o +c-obj-y := extable.o mmap.o c-obj-$(CONFIG_DISCONTIGMEM) += discontig.o c-obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/fault.c b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/fault.c similarity index 99% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/fault.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/mm/fault.c index 2c6a9ba6f8..b8d7e466a8 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/fault.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/fault.c @@ -24,8 +24,8 @@ #include #include -#include #include +#include extern void die(const char *,struct pt_regs *,long); @@ -229,6 +229,9 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code, error_code &= 3; error_code |= (regs->xcs & 2) << 1; + if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, + SIGSEGV) == NOTIFY_STOP) + return; #if 0 /* It's safe to allow irq's after cr2 has been saved */ if (regs->eflags & (X86_EFLAGS_IF|VM_MASK)) diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/highmem.c b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/highmem.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/highmem.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/mm/highmem.c diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/hypervisor.c b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/hypervisor.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/hypervisor.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/mm/hypervisor.c diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/init.c b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/init.c similarity index 99% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/init.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/mm/init.c index 41b5d288c4..74704113e6 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/init.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/init.c @@ -41,10 +41,12 @@ #include #include +unsigned int __VMALLOC_RESERVE = 128 << 20; + DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); unsigned long highstart_pfn, highend_pfn; -static int do_test_wp_bit(void); +static int noinline do_test_wp_bit(void); /* * Creates a middle page table and puts a pointer to it in the @@ -762,7 +764,7 @@ void __init pgtable_cache_init(void) * This function cannot be __init, since exceptions don't work in that * section. Put this after the callers, so that it cannot be inlined. */ -static int do_test_wp_bit(void) +static int noinline do_test_wp_bit(void) { char tmp_reg; int flag; diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/ioremap.c b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/ioremap.c similarity index 95% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/ioremap.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/mm/ioremap.c index ddf2ebba8a..06a0255905 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/ioremap.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/ioremap.c @@ -129,9 +129,9 @@ static int remap_area_pages(unsigned long address, unsigned long phys_addr, * have to convert them into an offset in a page-aligned mapping, but the * caller shouldn't need to know that small detail. */ -void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags) +void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags) { - void * addr; + void __iomem * addr; struct vm_struct * area; unsigned long offset, last_addr; @@ -147,7 +147,7 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag * Don't remap the low PCI/ISA area, it's always mapped.. */ if (phys_addr >= 0xA0000 && last_addr < 0x100000) - return phys_to_virt(phys_addr); + return (void __iomem *) phys_to_virt(phys_addr); /* * Don't allow anybody to remap normal RAM that we're using.. @@ -178,12 +178,12 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag if (!area) return NULL; area->phys_addr = phys_addr; - addr = area->addr; + addr = (void __iomem *) area->addr; if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) { - vunmap(addr); + vunmap((void __force *) addr); return NULL; } - return (void *) (offset + (char *)addr); + return (void __iomem *) (offset + (char __iomem *)addr); } @@ -209,10 +209,10 @@ void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flag * Must be freed with iounmap. */ -void *ioremap_nocache (unsigned long phys_addr, unsigned long size) +void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size) { unsigned long last_addr; - void *p = __ioremap(phys_addr, size, _PAGE_PCD); + void __iomem *p = __ioremap(phys_addr, size, _PAGE_PCD); if (!p) return p; @@ -243,14 +243,14 @@ void *ioremap_nocache (unsigned long phys_addr, unsigned long size) return p; } -void iounmap(void *addr) +void iounmap(volatile void __iomem *addr) { struct vm_struct *p; if ((unsigned long)addr <= 0x100000) return; - if (addr <= high_memory) + if ((void __force *) addr <= high_memory) return; - p = remove_vm_area((void *) (PAGE_MASK & (unsigned long) addr)); + p = remove_vm_area((void *) (PAGE_MASK & (unsigned long __force) addr)); if (!p) { printk("__iounmap: bad address %p\n", addr); return; diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/pageattr.c b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/pageattr.c similarity index 98% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/pageattr.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/mm/pageattr.c index 57341454ed..19f9d9c525 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/pageattr.c +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/pageattr.c @@ -114,7 +114,7 @@ __change_page_attr(struct page *page, pgprot_t prot) kpte = lookup_address(address); if (!kpte) return -EINVAL; - kpte_page = virt_to_page(((unsigned long)kpte) & PAGE_MASK); + kpte_page = virt_to_page(kpte); if (pgprot_val(prot) != pgprot_val(PAGE_KERNEL)) { if ((pte_val(*kpte) & _PAGE_PSE) == 0) { pte_t old = *kpte; diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/pgtable.c b/linux-2.6.9-xen-sparse/arch/xen/i386/mm/pgtable.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/mm/pgtable.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/mm/pgtable.c diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/pci/Makefile b/linux-2.6.9-xen-sparse/arch/xen/i386/pci/Makefile similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/pci/Makefile rename to linux-2.6.9-xen-sparse/arch/xen/i386/pci/Makefile diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/pci/direct.c b/linux-2.6.9-xen-sparse/arch/xen/i386/pci/direct.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/pci/direct.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/pci/direct.c diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/pci/irq.c b/linux-2.6.9-xen-sparse/arch/xen/i386/pci/irq.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/i386/pci/irq.c rename to linux-2.6.9-xen-sparse/arch/xen/i386/pci/irq.c diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/kernel/Makefile b/linux-2.6.9-xen-sparse/arch/xen/kernel/Makefile similarity index 61% rename from linux-2.6.8.1-xen-sparse/arch/xen/kernel/Makefile rename to linux-2.6.9-xen-sparse/arch/xen/kernel/Makefile index 38fabf7412..3768ed261f 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/kernel/Makefile +++ b/linux-2.6.9-xen-sparse/arch/xen/kernel/Makefile @@ -4,10 +4,10 @@ XENARCH := $(subst ",,$(CONFIG_XENARCH)) -$(obj)/vmlinux.lds.s: - @ln -fsn $(srctree)/arch/$(ARCH)/$(XENARCH)/kernel/vmlinux.lds.s $@ +$(obj)/vmlinux.lds: + @ln -fsn $(srctree)/arch/$(ARCH)/$(XENARCH)/kernel/vmlinux.lds $@ -extra-y += vmlinux.lds.s +extra-y += vmlinux.lds obj-y := ctrl_if.o evtchn.o fixup.o process.o reboot.o xen_proc.o empty.o \ gnttab.o skbuff.o diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/kernel/ctrl_if.c b/linux-2.6.9-xen-sparse/arch/xen/kernel/ctrl_if.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/kernel/ctrl_if.c rename to linux-2.6.9-xen-sparse/arch/xen/kernel/ctrl_if.c diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/kernel/empty.c b/linux-2.6.9-xen-sparse/arch/xen/kernel/empty.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/kernel/empty.c rename to linux-2.6.9-xen-sparse/arch/xen/kernel/empty.c diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/kernel/evtchn.c b/linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/kernel/evtchn.c rename to linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/kernel/fixup.c b/linux-2.6.9-xen-sparse/arch/xen/kernel/fixup.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/kernel/fixup.c rename to linux-2.6.9-xen-sparse/arch/xen/kernel/fixup.c diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/kernel/gnttab.c b/linux-2.6.9-xen-sparse/arch/xen/kernel/gnttab.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/kernel/gnttab.c rename to linux-2.6.9-xen-sparse/arch/xen/kernel/gnttab.c diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/kernel/process.c b/linux-2.6.9-xen-sparse/arch/xen/kernel/process.c similarity index 83% rename from linux-2.6.8.1-xen-sparse/arch/xen/kernel/process.c rename to linux-2.6.9-xen-sparse/arch/xen/kernel/process.c index 3656196a99..3a0c620dd6 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/kernel/process.c +++ b/linux-2.6.9-xen-sparse/arch/xen/kernel/process.c @@ -12,10 +12,10 @@ extern int set_timeout_timer(void); void xen_cpu_idle (void) { - int cpu = smp_processor_id(); + struct rcu_data *rdp = &__get_cpu_var(rcu_bh_data); local_irq_disable(); - if (need_resched() || RCU_curlist(cpu)) { + if (need_resched() || rdp->curlist) { local_irq_enable(); return; } diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/kernel/reboot.c b/linux-2.6.9-xen-sparse/arch/xen/kernel/reboot.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/kernel/reboot.c rename to linux-2.6.9-xen-sparse/arch/xen/kernel/reboot.c diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/kernel/skbuff.c b/linux-2.6.9-xen-sparse/arch/xen/kernel/skbuff.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/kernel/skbuff.c rename to linux-2.6.9-xen-sparse/arch/xen/kernel/skbuff.c diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/kernel/xen_proc.c b/linux-2.6.9-xen-sparse/arch/xen/kernel/xen_proc.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/arch/xen/kernel/xen_proc.c rename to linux-2.6.9-xen-sparse/arch/xen/kernel/xen_proc.c diff --git a/linux-2.6.8.1-xen-sparse/drivers/Makefile b/linux-2.6.9-xen-sparse/drivers/Makefile similarity index 85% rename from linux-2.6.8.1-xen-sparse/drivers/Makefile rename to linux-2.6.9-xen-sparse/drivers/Makefile index f21855a6a2..6137e3883d 100644 --- a/linux-2.6.8.1-xen-sparse/drivers/Makefile +++ b/linux-2.6.9-xen-sparse/drivers/Makefile @@ -7,6 +7,7 @@ obj-$(CONFIG_PCI) += pci/ obj-$(CONFIG_PARISC) += parisc/ +obj-y += video/ obj-$(CONFIG_ACPI_BOOT) += acpi/ # PnP must come after ACPI since it will eventually need to check if acpi # was used and do nothing if so @@ -15,6 +16,13 @@ obj-$(CONFIG_PNP) += pnp/ # char/ comes before serial/ etc so that the VT console is the boot-time # default. obj-y += char/ + +# i810fb depends on char/agp/ +obj-$(CONFIG_FB_I810) += video/i810/ + +# we also need input/serio early so serio bus is initialized by the time +# serial drivers start registering their serio ports +obj-$(CONFIG_SERIO) += input/serio/ obj-y += serial/ obj-$(CONFIG_PARPORT) += parport/ obj-y += base/ block/ misc/ net/ media/ @@ -27,7 +35,7 @@ obj-$(CONFIG_FC4) += fc4/ obj-$(CONFIG_SCSI) += scsi/ obj-$(CONFIG_FUSION) += message/ obj-$(CONFIG_IEEE1394) += ieee1394/ -obj-y += cdrom/ video/ +obj-y += cdrom/ obj-$(CONFIG_MTD) += mtd/ obj-$(CONFIG_PCMCIA) += pcmcia/ obj-$(CONFIG_DIO) += dio/ @@ -40,7 +48,6 @@ obj-$(CONFIG_USB) += usb/ obj-$(CONFIG_USB_GADGET) += usb/gadget/ obj-$(CONFIG_INPUT) += input/ obj-$(CONFIG_GAMEPORT) += input/gameport/ -obj-$(CONFIG_SERIO) += input/serio/ obj-$(CONFIG_I2O) += message/ obj-$(CONFIG_I2C) += i2c/ obj-$(CONFIG_W1) += w1/ @@ -51,4 +58,5 @@ obj-$(CONFIG_ISDN) += isdn/ obj-$(CONFIG_MCA) += mca/ obj-$(CONFIG_EISA) += eisa/ obj-$(CONFIG_CPU_FREQ) += cpufreq/ +obj-$(CONFIG_MMC) += mmc/ obj-y += firmware/ diff --git a/linux-2.6.8.1-xen-sparse/drivers/char/mem.c b/linux-2.6.9-xen-sparse/drivers/char/mem.c similarity index 99% rename from linux-2.6.8.1-xen-sparse/drivers/char/mem.c rename to linux-2.6.9-xen-sparse/drivers/char/mem.c index 3970f88b2a..83f54c227c 100644 --- a/linux-2.6.8.1-xen-sparse/drivers/char/mem.c +++ b/linux-2.6.9-xen-sparse/drivers/char/mem.c @@ -32,9 +32,6 @@ # include #endif -#ifdef CONFIG_FB -extern void fbmem_init(void); -#endif #if defined(CONFIG_S390_TAPE) && defined(CONFIG_S390_TAPE_CHAR) extern void tapechar_init(void); #endif @@ -87,7 +84,7 @@ static inline int uncached_access(struct file *file, unsigned long addr) * above the IO hole... Ah, and of course, XFree86 doesn't pass * O_SYNC when mapping us to tap IO space. Surprised ? */ - return !page_is_ram(addr); + return !page_is_ram(addr >> PAGE_SHIFT); #else /* * Accessing memory above the top the kernel knows about or through a file pointer @@ -436,7 +433,7 @@ static inline size_t read_zero_pagealigned(char __user * buf, size_t size) if (vma->vm_start > addr || (vma->vm_flags & VM_WRITE) == 0) goto out_up; - if (vma->vm_flags & VM_SHARED) + if (vma->vm_flags & (VM_SHARED | VM_HUGETLB)) break; count = vma->vm_end - addr; if (count > size) @@ -750,9 +747,6 @@ static int __init chr_dev_init(void) S_IFCHR | devlist[i].mode, devlist[i].name); } -#if defined (CONFIG_FB) - fbmem_init(); -#endif return 0; } diff --git a/linux-2.6.8.1-xen-sparse/drivers/char/tty_io.c b/linux-2.6.9-xen-sparse/drivers/char/tty_io.c similarity index 78% rename from linux-2.6.8.1-xen-sparse/drivers/char/tty_io.c rename to linux-2.6.9-xen-sparse/drivers/char/tty_io.c index bdb091035f..c524a5c13a 100644 --- a/linux-2.6.8.1-xen-sparse/drivers/char/tty_io.c +++ b/linux-2.6.9-xen-sparse/drivers/char/tty_io.c @@ -92,6 +92,7 @@ #include #include #include +#include #include #include @@ -120,10 +121,14 @@ struct termios tty_std_termios = { /* for the benefit of tty drivers */ EXPORT_SYMBOL(tty_std_termios); +/* This list gets poked at by procfs and various bits of boot up code. This + could do with some rationalisation such as pulling the tty proc function + into this file */ + LIST_HEAD(tty_drivers); /* linked list of tty drivers */ -struct tty_ldisc ldiscs[NR_LDISCS]; /* line disc dispatch table */ -/* Semaphore to protect creating and releasing a tty */ +/* Semaphore to protect creating and releasing a tty. This is shared with + vt.c for deeply disgusting hack reasons */ DECLARE_MUTEX(tty_sem); #ifdef CONFIG_VT @@ -145,6 +150,7 @@ static ssize_t tty_write(struct file *, const char __user *, size_t, loff_t *); ssize_t redirected_tty_write(struct file *, const char __user *, size_t, loff_t *); static unsigned int tty_poll(struct file *, poll_table *); static int tty_open(struct inode *, struct file *); +static int ptmx_open(struct inode *, struct file *); static int tty_release(struct inode *, struct file *); int tty_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg); @@ -226,65 +232,323 @@ static int check_tty_count(struct tty_struct *tty, const char *routine) return 0; } +/* + * This is probably overkill for real world processors but + * they are not on hot paths so a little discipline won't do + * any harm. + */ + +static void tty_set_termios_ldisc(struct tty_struct *tty, int num) +{ + down(&tty->termios_sem); + tty->termios->c_line = num; + up(&tty->termios_sem); +} + +/* + * This guards the refcounted line discipline lists. The lock + * must be taken with irqs off because there are hangup path + * callers who will do ldisc lookups and cannot sleep. + */ + +static spinlock_t tty_ldisc_lock = SPIN_LOCK_UNLOCKED; +static DECLARE_WAIT_QUEUE_HEAD(tty_ldisc_wait); +static struct tty_ldisc tty_ldiscs[NR_LDISCS]; /* line disc dispatch table */ + int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc) { + unsigned long flags; + int ret = 0; + if (disc < N_TTY || disc >= NR_LDISCS) return -EINVAL; + spin_lock_irqsave(&tty_ldisc_lock, flags); if (new_ldisc) { - ldiscs[disc] = *new_ldisc; - ldiscs[disc].flags |= LDISC_FLAG_DEFINED; - ldiscs[disc].num = disc; - } else - memset(&ldiscs[disc], 0, sizeof(struct tty_ldisc)); + tty_ldiscs[disc] = *new_ldisc; + tty_ldiscs[disc].num = disc; + tty_ldiscs[disc].flags |= LDISC_FLAG_DEFINED; + tty_ldiscs[disc].refcount = 0; + } else { + if(tty_ldiscs[disc].refcount) + ret = -EBUSY; + else + tty_ldiscs[disc].flags &= ~LDISC_FLAG_DEFINED; + } + spin_unlock_irqrestore(&tty_ldisc_lock, flags); - return 0; + return ret; } EXPORT_SYMBOL(tty_register_ldisc); -/* Set the discipline of a tty line. */ +struct tty_ldisc *tty_ldisc_get(int disc) +{ + unsigned long flags; + struct tty_ldisc *ld; + + if (disc < N_TTY || disc >= NR_LDISCS) + return NULL; + + spin_lock_irqsave(&tty_ldisc_lock, flags); + + ld = &tty_ldiscs[disc]; + /* Check the entry is defined */ + if(ld->flags & LDISC_FLAG_DEFINED) + { + /* If the module is being unloaded we can't use it */ + if (!try_module_get(ld->owner)) + ld = NULL; + else /* lock it */ + ld->refcount++; + } + else + ld = NULL; + spin_unlock_irqrestore(&tty_ldisc_lock, flags); + return ld; +} + +EXPORT_SYMBOL_GPL(tty_ldisc_get); + +void tty_ldisc_put(int disc) +{ + struct tty_ldisc *ld; + unsigned long flags; + + if (disc < N_TTY || disc >= NR_LDISCS) + BUG(); + + spin_lock_irqsave(&tty_ldisc_lock, flags); + ld = &tty_ldiscs[disc]; + if(ld->refcount == 0) + BUG(); + ld->refcount --; + module_put(ld->owner); + spin_unlock_irqrestore(&tty_ldisc_lock, flags); +} + +EXPORT_SYMBOL_GPL(tty_ldisc_put); + +void tty_ldisc_assign(struct tty_struct *tty, struct tty_ldisc *ld) +{ + tty->ldisc = *ld; + tty->ldisc.refcount = 0; +} + +/** + * tty_ldisc_try - internal helper + * @tty: the tty + * + * Make a single attempt to grab and bump the refcount on + * the tty ldisc. Return 0 on failure or 1 on success. This is + * used to implement both the waiting and non waiting versions + * of tty_ldisc_ref + */ + +static int tty_ldisc_try(struct tty_struct *tty) +{ + unsigned long flags; + struct tty_ldisc *ld; + int ret = 0; + + spin_lock_irqsave(&tty_ldisc_lock, flags); + ld = &tty->ldisc; + if(test_bit(TTY_LDISC, &tty->flags)) + { + ld->refcount++; + ret = 1; + } + spin_unlock_irqrestore(&tty_ldisc_lock, flags); + return ret; +} + +/** + * tty_ldisc_ref_wait - wait for the tty ldisc + * @tty: tty device + * + * Dereference the line discipline for the terminal and take a + * reference to it. If the line discipline is in flux then + * wait patiently until it changes. + * + * Note: Must not be called from an IRQ/timer context. The caller + * must also be careful not to hold other locks that will deadlock + * against a discipline change, such as an existing ldisc reference + * (which we check for) + */ + +struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty) +{ + /* wait_event is a macro */ + wait_event(tty_ldisc_wait, tty_ldisc_try(tty)); + if(tty->ldisc.refcount == 0) + printk(KERN_ERR "tty_ldisc_ref_wait\n"); + return &tty->ldisc; +} + +EXPORT_SYMBOL_GPL(tty_ldisc_ref_wait); + +/** + * tty_ldisc_ref - get the tty ldisc + * @tty: tty device + * + * Dereference the line discipline for the terminal and take a + * reference to it. If the line discipline is in flux then + * return NULL. Can be called from IRQ and timer functions. + */ + +struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty) +{ + if(tty_ldisc_try(tty)) + return &tty->ldisc; + return NULL; +} + +EXPORT_SYMBOL_GPL(tty_ldisc_ref); + +/** + * tty_ldisc_deref - free a tty ldisc reference + * @ld: reference to free up + * + * Undoes the effect of tty_ldisc_ref or tty_ldisc_ref_wait. May + * be called in IRQ context. + */ + +void tty_ldisc_deref(struct tty_ldisc *ld) +{ + unsigned long flags; + + if(ld == NULL) + BUG(); + + spin_lock_irqsave(&tty_ldisc_lock, flags); + if(ld->refcount == 0) + printk(KERN_ERR "tty_ldisc_deref: no references.\n"); + else + ld->refcount--; + if(ld->refcount == 0) + wake_up(&tty_ldisc_wait); + spin_unlock_irqrestore(&tty_ldisc_lock, flags); +} + +EXPORT_SYMBOL_GPL(tty_ldisc_deref); + +/** + * tty_ldisc_enable - allow ldisc use + * @tty: terminal to activate ldisc on + * + * Set the TTY_LDISC flag when the line discipline can be called + * again. Do neccessary wakeups for existing sleepers. + * + * Note: nobody should set this bit except via this function. Clearing + * directly is allowed. + */ + +static void tty_ldisc_enable(struct tty_struct *tty) +{ + set_bit(TTY_LDISC, &tty->flags); + wake_up(&tty_ldisc_wait); +} + +/** + * tty_set_ldisc - set line discipline + * @tty: the terminal to set + * @ldisc: the line discipline + * + * Set the discipline of a tty line. Must be called from a process + * context. + */ + static int tty_set_ldisc(struct tty_struct *tty, int ldisc) { int retval = 0; struct tty_ldisc o_ldisc; char buf[64]; + int work; + unsigned long flags; + struct tty_ldisc *ld; if ((ldisc < N_TTY) || (ldisc >= NR_LDISCS)) return -EINVAL; + +restart: + + if (tty->ldisc.num == ldisc) + return 0; /* We are already in the desired discipline */ + + ld = tty_ldisc_get(ldisc); /* Eduardo Blanco */ /* Cyrus Durgin */ - if (!(ldiscs[ldisc].flags & LDISC_FLAG_DEFINED)) { + if (ld == NULL) { request_module("tty-ldisc-%d", ldisc); + ld = tty_ldisc_get(ldisc); } - if (!(ldiscs[ldisc].flags & LDISC_FLAG_DEFINED)) + if (ld == NULL) return -EINVAL; - if (tty->ldisc.num == ldisc) - return 0; /* We are already in the desired discipline */ - - if (!try_module_get(ldiscs[ldisc].owner)) - return -EINVAL; - o_ldisc = tty->ldisc; tty_wait_until_sent(tty, 0); + + /* + * Make sure we don't change while someone holds a + * reference to the line discipline. The TTY_LDISC bit + * prevents anyone taking a reference once it is clear. + * We need the lock to avoid racing reference takers. + */ + + spin_lock_irqsave(&tty_ldisc_lock, flags); + if(tty->ldisc.refcount) + { + /* Free the new ldisc we grabbed. Must drop the lock + first. */ + spin_unlock_irqrestore(&tty_ldisc_lock, flags); + tty_ldisc_put(ldisc); + /* + * There are several reasons we may be busy, including + * random momentary I/O traffic. We must therefore + * retry. We could distinguish between blocking ops + * and retries if we made tty_ldisc_wait() smarter. That + * is up for discussion. + */ + if(wait_event_interruptible(tty_ldisc_wait, tty->ldisc.refcount == 0) < 0) + return -ERESTARTSYS; + goto restart; + } + clear_bit(TTY_LDISC, &tty->flags); + clear_bit(TTY_DONT_FLIP, &tty->flags); + spin_unlock_irqrestore(&tty_ldisc_lock, flags); + /* + * From this point on we know nobody has an ldisc + * usage reference, nor can they obtain one until + * we say so later on. + */ + + work = cancel_delayed_work(&tty->flip.work); + /* + * Wait for ->hangup_work and ->flip.work handlers to terminate + */ + + flush_scheduled_work(); /* Shutdown the current discipline. */ if (tty->ldisc.close) (tty->ldisc.close)(tty); /* Now set up the new line discipline. */ - tty->ldisc = ldiscs[ldisc]; - tty->termios->c_line = ldisc; + tty_ldisc_assign(tty, ld); + tty_set_termios_ldisc(tty, ldisc); if (tty->ldisc.open) retval = (tty->ldisc.open)(tty); if (retval < 0) { - tty->ldisc = o_ldisc; - tty->termios->c_line = tty->ldisc.num; + tty_ldisc_put(ldisc); + /* There is an outstanding reference here so this is safe */ + tty_ldisc_assign(tty, tty_ldisc_get(o_ldisc.num)); + tty_set_termios_ldisc(tty, tty->ldisc.num); if (tty->ldisc.open && (tty->ldisc.open(tty) < 0)) { - tty->ldisc = ldiscs[N_TTY]; - tty->termios->c_line = N_TTY; + tty_ldisc_put(o_ldisc.num); + /* This driver is always present */ + tty_ldisc_assign(tty, tty_ldisc_get(N_TTY)); + tty_set_termios_ldisc(tty, N_TTY); if (tty->ldisc.open) { int r = tty->ldisc.open(tty); @@ -294,12 +558,27 @@ static int tty_set_ldisc(struct tty_struct *tty, int ldisc) tty_name(tty, buf), r); } } - } else { - module_put(o_ldisc.owner); } + /* At this point we hold a reference to the new ldisc and a + a reference to the old ldisc. If we ended up flipping back + to the existing ldisc we have two references to it */ if (tty->ldisc.num != o_ldisc.num && tty->driver->set_ldisc) tty->driver->set_ldisc(tty); + + tty_ldisc_put(o_ldisc.num); + + /* + * Allow ldisc referencing to occur as soon as the driver + * ldisc callback completes. + */ + + tty_ldisc_enable(tty); + + /* Restart it in case no characters kick it off. Safe if + already running */ + if(work) + schedule_delayed_work(&tty->flip.work, 1); return retval; } @@ -380,6 +659,19 @@ static struct file_operations tty_fops = { .fasync = tty_fasync, }; +#ifdef CONFIG_UNIX98_PTYS +static struct file_operations ptmx_fops = { + .llseek = no_llseek, + .read = tty_read, + .write = tty_write, + .poll = tty_poll, + .ioctl = tty_ioctl, + .open = ptmx_open, + .release = tty_release, + .fasync = tty_fasync, +}; +#endif + static struct file_operations console_fops = { .llseek = no_llseek, .read = tty_read, @@ -402,6 +694,53 @@ static struct file_operations hung_up_tty_fops = { static spinlock_t redirect_lock = SPIN_LOCK_UNLOCKED; static struct file *redirect; + +/** + * tty_wakeup - request more data + * @tty: terminal + * + * Internal and external helper for wakeups of tty. This function + * informs the line discipline if present that the driver is ready + * to receive more output data. + */ + +void tty_wakeup(struct tty_struct *tty) +{ + struct tty_ldisc *ld; + + if (test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) { + ld = tty_ldisc_ref(tty); + if(ld) { + if(ld->write_wakeup) + ld->write_wakeup(tty); + tty_ldisc_deref(ld); + } + } + wake_up_interruptible(&tty->write_wait); +} + +EXPORT_SYMBOL_GPL(tty_wakeup); + +/** + * tty_ldisc_flush - flush line discipline queue + * @tty: tty + * + * Flush the line discipline queue (if any) for this tty. If there + * is no line discipline active this is a no-op. + */ + +void tty_ldisc_flush(struct tty_struct *tty) +{ + struct tty_ldisc *ld = tty_ldisc_ref(tty); + if(ld) { + if(ld->flush_buffer) + ld->flush_buffer(tty); + tty_ldisc_deref(ld); + } +} + +EXPORT_SYMBOL_GPL(tty_ldisc_flush); + /* * This can be called by the "eventd" kernel thread. That is process synchronous, * but doesn't hold any locks, so we need to make sure we have the appropriate @@ -413,7 +752,7 @@ void do_tty_hangup(void *data) struct file * cons_filp = NULL; struct file *filp, *f = NULL; struct task_struct *p; - struct pid *pid; + struct tty_ldisc *ld; int closecount = 0, n; if (!tty) @@ -431,6 +770,7 @@ void do_tty_hangup(void *data) check_tty_count(tty, "do_tty_hangup"); file_list_lock(); + /* This breaks for file handles being sent over AF_UNIX sockets ? */ list_for_each_entry(filp, &tty->tty_files, f_list) { if (filp->f_op->write == redirected_tty_write) cons_filp = filp; @@ -443,21 +783,25 @@ void do_tty_hangup(void *data) file_list_unlock(); /* FIXME! What are the locking issues here? This may me overdoing things.. - * this question is especially important now that we've removed the irqlock. */ - { - unsigned long flags; + * this question is especially important now that we've removed the irqlock. */ - local_irq_save(flags); // FIXME: is this safe? - if (tty->ldisc.flush_buffer) - tty->ldisc.flush_buffer(tty); + ld = tty_ldisc_ref(tty); + if(ld != NULL) /* We may have no line discipline at this point */ + { + if (ld->flush_buffer) + ld->flush_buffer(tty); if (tty->driver->flush_buffer) tty->driver->flush_buffer(tty); if ((test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) && - tty->ldisc.write_wakeup) - (tty->ldisc.write_wakeup)(tty); - local_irq_restore(flags); // FIXME: is this safe? + ld->write_wakeup) + ld->write_wakeup(tty); + if (ld->hangup) + ld->hangup(tty); } + /* FIXME: Once we trust the LDISC code better we can wait here for + ldisc completion and fix the driver call race */ + wake_up_interruptible(&tty->write_wait); wake_up_interruptible(&tty->read_wait); @@ -466,26 +810,21 @@ void do_tty_hangup(void *data) * N_TTY. */ if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) + { + down(&tty->termios_sem); *tty->termios = tty->driver->init_termios; - if (tty->ldisc.num != ldiscs[N_TTY].num) { - if (tty->ldisc.close) - (tty->ldisc.close)(tty); - module_put(tty->ldisc.owner); - - tty->ldisc = ldiscs[N_TTY]; - tty->termios->c_line = N_TTY; - if (tty->ldisc.open) { - int i = (tty->ldisc.open)(tty); - if (i < 0) - printk(KERN_ERR "do_tty_hangup: N_TTY open: " - "error %d\n", -i); - } + up(&tty->termios_sem); } + /* Defer ldisc switch */ + /* tty_deferred_ldisc_switch(N_TTY); + + This should get done automatically when the port closes and + tty_release is called */ + read_lock(&tasklist_lock); if (tty->session > 0) { - struct list_head *l; - for_each_task_pid(tty->session, PIDTYPE_SID, p, l, pid) { + do_each_task_pid(tty->session, PIDTYPE_SID, p) { if (p->signal->tty == tty) p->signal->tty = NULL; if (!p->signal->leader) @@ -494,7 +833,7 @@ void do_tty_hangup(void *data) send_group_sig_info(SIGCONT, SEND_SIG_PRIV, p); if (tty->pgrp > 0) p->signal->tty_old_pgrp = tty->pgrp; - } + } while_each_task_pid(tty->session, PIDTYPE_SID, p); } read_unlock(&tasklist_lock); @@ -514,6 +853,17 @@ void do_tty_hangup(void *data) tty->driver->close(tty, cons_filp); } else if (tty->driver->hangup) (tty->driver->hangup)(tty); + + /* We don't want to have driver/ldisc interactions beyond + the ones we did here. The driver layer expects no + calls after ->hangup() from the ldisc side. However we + can't yet guarantee all that */ + + set_bit(TTY_HUPPED, &tty->flags); + if (ld) { + tty_ldisc_enable(tty); + tty_ldisc_deref(ld); + } unlock_kernel(); if (f) fput(f); @@ -566,8 +916,6 @@ void disassociate_ctty(int on_exit) { struct tty_struct *tty; struct task_struct *p; - struct list_head *l; - struct pid *pid; int tty_pgrp = -1; lock_kernel(); @@ -596,8 +944,9 @@ void disassociate_ctty(int on_exit) tty->pgrp = -1; read_lock(&tasklist_lock); - for_each_task_pid(current->signal->session, PIDTYPE_SID, p, l, pid) + do_each_task_pid(current->signal->session, PIDTYPE_SID, p) { p->signal->tty = NULL; + } while_each_task_pid(current->signal->session, PIDTYPE_SID, p); read_unlock(&tasklist_lock); unlock_kernel(); } @@ -630,9 +979,9 @@ void start_tty(struct tty_struct *tty) } if (tty->driver->start) (tty->driver->start)(tty); - if ((test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) && - tty->ldisc.write_wakeup) - (tty->ldisc.write_wakeup)(tty); + + /* If we have a running line discipline it may need kicking */ + tty_wakeup(tty); wake_up_interruptible(&tty->write_wait); } @@ -644,6 +993,7 @@ static ssize_t tty_read(struct file * file, char __user * buf, size_t count, int i; struct tty_struct * tty; struct inode *inode; + struct tty_ldisc *ld; tty = (struct tty_struct *)file->private_data; inode = file->f_dentry->d_inode; @@ -652,11 +1002,15 @@ static ssize_t tty_read(struct file * file, char __user * buf, size_t count, if (!tty || (test_bit(TTY_IO_ERROR, &tty->flags))) return -EIO; + /* We want to wait for the line discipline to sort out in this + situation */ + ld = tty_ldisc_ref_wait(tty); lock_kernel(); - if (tty->ldisc.read) - i = (tty->ldisc.read)(tty,file,buf,count); + if (ld->read) + i = (ld->read)(tty,file,buf,count); else i = -EIO; + tty_ldisc_deref(ld); unlock_kernel(); if (i > 0) inode->i_atime = CURRENT_TIME; @@ -718,16 +1072,23 @@ static ssize_t tty_write(struct file * file, const char __user * buf, size_t cou { struct tty_struct * tty; struct inode *inode = file->f_dentry->d_inode; - + ssize_t ret; + struct tty_ldisc *ld; + tty = (struct tty_struct *)file->private_data; if (tty_paranoia_check(tty, inode, "tty_write")) return -EIO; if (!tty || !tty->driver->write || (test_bit(TTY_IO_ERROR, &tty->flags))) return -EIO; - if (!tty->ldisc.write) - return -EIO; - return do_tty_write(tty->ldisc.write, tty, file, + + ld = tty_ldisc_ref_wait(tty); + if (!ld->write) + ret = -EIO; + else + ret = do_tty_write(ld->write, tty, file, (const unsigned char __user *)buf, count); + tty_ldisc_deref(ld); + return ret; } ssize_t redirected_tty_write(struct file * file, const char __user * buf, size_t count, @@ -752,6 +1113,17 @@ ssize_t redirected_tty_write(struct file * file, const char __user * buf, size_t return tty_write(file, buf, count, ppos); } +static char ptychar[] = "pqrstuvwxyzabcde"; + +static inline void pty_line_name(struct tty_driver *driver, int index, char *p) +{ + int i = index + driver->name_base; + /* ->name is initialized to "ttyp", but "tty" is expected */ + sprintf(p, "%s%c%x", + driver->subtype == PTY_TYPE_SLAVE ? "tty" : driver->name, + ptychar[i >> 4 & 0xf], i & 0xf); +} + static inline void tty_line_name(struct tty_driver *driver, int index, char *p) { sprintf(p, "%s%d", driver->name, index + driver->name_base); @@ -913,6 +1285,7 @@ static int init_dev(struct tty_driver *driver, int idx, * If we fail here just call release_mem to clean up. No need * to decrement the use counts, as release_mem doesn't care. */ + if (tty->ldisc.open) { retval = (tty->ldisc.open)(tty); if (retval) @@ -925,7 +1298,9 @@ static int init_dev(struct tty_driver *driver, int idx, (tty->ldisc.close)(tty); goto release_mem_out; } + tty_ldisc_enable(o_tty); } + tty_ldisc_enable(tty); goto success; /* @@ -954,6 +1329,9 @@ fast_track: tty->count++; tty->driver = driver; /* N.B. why do this every time?? */ + /* FIXME */ + if(!test_bit(TTY_LDISC, &tty->flags)) + printk(KERN_ERR "init_dev but no ldisc\n"); success: *ret_tty = tty; @@ -1057,6 +1435,7 @@ static void release_dev(struct file * filp) int devpts_master, devpts; int idx; char buf[64]; + unsigned long flags; tty = (struct tty_struct *)filp->private_data; if (tty_paranoia_check(tty, filp->f_dentry->d_inode, "release_dev")) @@ -1133,7 +1512,6 @@ static void release_dev(struct file * filp) } } #endif - if (tty->driver->close) tty->driver->close(tty, filp); @@ -1238,15 +1616,15 @@ static void release_dev(struct file * filp) */ if (tty_closing || o_tty_closing) { struct task_struct *p; - struct list_head *l; - struct pid *pid; read_lock(&tasklist_lock); - for_each_task_pid(tty->session, PIDTYPE_SID, p, l, pid) + do_each_task_pid(tty->session, PIDTYPE_SID, p) { p->signal->tty = NULL; + } while_each_task_pid(tty->session, PIDTYPE_SID, p); if (o_tty) - for_each_task_pid(o_tty->session, PIDTYPE_SID, p,l, pid) + do_each_task_pid(o_tty->session, PIDTYPE_SID, p) { p->signal->tty = NULL; + } while_each_task_pid(o_tty->session, PIDTYPE_SID, p); read_unlock(&tasklist_lock); } @@ -1257,36 +1635,58 @@ static void release_dev(struct file * filp) #ifdef TTY_DEBUG_HANGUP printk(KERN_DEBUG "freeing tty structure..."); #endif - /* * Prevent flush_to_ldisc() from rescheduling the work for later. Then - * kill any delayed work. + * kill any delayed work. As this is the final close it does not + * race with the set_ldisc code path. */ + clear_bit(TTY_LDISC, &tty->flags); clear_bit(TTY_DONT_FLIP, &tty->flags); cancel_delayed_work(&tty->flip.work); /* * Wait for ->hangup_work and ->flip.work handlers to terminate */ + flush_scheduled_work(); - + + /* + * Wait for any short term users (we know they are just driver + * side waiters as the file is closing so user count on the file + * side is zero. + */ + spin_lock_irqsave(&tty_ldisc_lock, flags); + while(tty->ldisc.refcount) + { + spin_unlock_irqrestore(&tty_ldisc_lock, flags); + wait_event(tty_ldisc_wait, tty->ldisc.refcount == 0); + spin_lock_irqsave(&tty_ldisc_lock, flags); + } + spin_unlock_irqrestore(&tty_ldisc_lock, flags); /* * Shutdown the current line discipline, and reset it to N_TTY. * N.B. why reset ldisc when we're releasing the memory?? + * + * FIXME: this MUST get fixed for the new reflocking */ if (tty->ldisc.close) (tty->ldisc.close)(tty); - module_put(tty->ldisc.owner); + tty_ldisc_put(tty->ldisc.num); - tty->ldisc = ldiscs[N_TTY]; - tty->termios->c_line = N_TTY; + /* + * Switch the line discipline back + */ + tty_ldisc_assign(tty, tty_ldisc_get(N_TTY)); + tty_set_termios_ldisc(tty,N_TTY); if (o_tty) { + /* FIXME: could o_tty be in setldisc here ? */ + clear_bit(TTY_LDISC, &o_tty->flags); if (o_tty->ldisc.close) (o_tty->ldisc.close)(o_tty); - module_put(o_tty->ldisc.owner); - o_tty->ldisc = ldiscs[N_TTY]; + tty_ldisc_put(o_tty->ldisc.num); + tty_ldisc_assign(o_tty, tty_ldisc_get(N_TTY)); + tty_set_termios_ldisc(o_tty,N_TTY); } - /* * The release_mem function takes care of the details of clearing * the slots and preserving the termios structure. @@ -1326,6 +1726,7 @@ static int tty_open(struct inode * inode, struct file * filp) unsigned short saved_flags = filp->f_flags; nonseekable_open(inode, filp); + retry_open: noctty = filp->f_flags & O_NOCTTY; index = -1; @@ -1361,53 +1762,13 @@ retry_open: return -ENODEV; } -#ifdef CONFIG_UNIX98_PTYS - if (device == MKDEV(TTYAUX_MAJOR,2)) { - int idr_ret; - - /* find a device that is not in use. */ - down(&allocated_ptys_lock); - if (!idr_pre_get(&allocated_ptys, GFP_KERNEL)) { - up(&allocated_ptys_lock); - return -ENOMEM; - } - idr_ret = idr_get_new(&allocated_ptys, NULL, &index); - if (idr_ret < 0) { - up(&allocated_ptys_lock); - if (idr_ret == -EAGAIN) - return -ENOMEM; - return -EIO; - } - if (index >= pty_limit) { - idr_remove(&allocated_ptys, index); - up(&allocated_ptys_lock); - return -EIO; - } - up(&allocated_ptys_lock); - - driver = ptm_driver; - retval = init_dev(driver, index, &tty); - if (retval) { - down(&allocated_ptys_lock); - idr_remove(&allocated_ptys, index); - up(&allocated_ptys_lock); - return retval; - } - - set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */ - if (devpts_pty_new(tty->link)) - retval = -ENOMEM; - } else -#endif - { - driver = get_tty_driver(device, &index); - if (!driver) - return -ENODEV; + driver = get_tty_driver(device, &index); + if (!driver) + return -ENODEV; got_driver: - retval = init_dev(driver, index, &tty); - if (retval) - return retval; - } + retval = init_dev(driver, index, &tty); + if (retval) + return retval; filp->private_data = tty; file_move(filp, &tty->tty_files); @@ -1434,15 +1795,6 @@ got_driver: printk(KERN_DEBUG "error %d in opening %s...", retval, tty->name); #endif - -#ifdef CONFIG_UNIX98_PTYS - if (index != -1) { - down(&allocated_ptys_lock); - idr_remove(&allocated_ptys, index); - up(&allocated_ptys_lock); - } -#endif - release_dev(filp); if (retval != -ERESTARTSYS) return retval; @@ -1470,6 +1822,62 @@ got_driver: return 0; } +#ifdef CONFIG_UNIX98_PTYS +static int ptmx_open(struct inode * inode, struct file * filp) +{ + struct tty_struct *tty; + int retval; + int index; + int idr_ret; + + nonseekable_open(inode, filp); + + /* find a device that is not in use. */ + down(&allocated_ptys_lock); + if (!idr_pre_get(&allocated_ptys, GFP_KERNEL)) { + up(&allocated_ptys_lock); + return -ENOMEM; + } + idr_ret = idr_get_new(&allocated_ptys, NULL, &index); + if (idr_ret < 0) { + up(&allocated_ptys_lock); + if (idr_ret == -EAGAIN) + return -ENOMEM; + return -EIO; + } + if (index >= pty_limit) { + idr_remove(&allocated_ptys, index); + up(&allocated_ptys_lock); + return -EIO; + } + up(&allocated_ptys_lock); + + retval = init_dev(ptm_driver, index, &tty); + if (retval) + goto out; + + set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */ + filp->private_data = tty; + file_move(filp, &tty->tty_files); + + retval = -ENOMEM; + if (devpts_pty_new(tty->link)) + goto out1; + + check_tty_count(tty, "tty_open"); + retval = ptm_driver->open(tty, filp); + if (!retval) + return 0; +out1: + release_dev(filp); +out: + down(&allocated_ptys_lock); + idr_remove(&allocated_ptys, index); + up(&allocated_ptys_lock); + return retval; +} +#endif + static int tty_release(struct inode * inode, struct file * filp) { lock_kernel(); @@ -1482,14 +1890,18 @@ static int tty_release(struct inode * inode, struct file * filp) static unsigned int tty_poll(struct file * filp, poll_table * wait) { struct tty_struct * tty; + struct tty_ldisc *ld; + int ret = 0; tty = (struct tty_struct *)filp->private_data; if (tty_paranoia_check(tty, filp->f_dentry->d_inode, "tty_poll")) return 0; - - if (tty->ldisc.poll) - return (tty->ldisc.poll)(tty, filp, wait); - return 0; + + ld = tty_ldisc_ref_wait(tty); + if (ld->poll) + ret = (ld->poll)(tty, filp, wait); + tty_ldisc_deref(ld); + return ret; } static int tty_fasync(int fd, struct file * filp, int on) @@ -1521,12 +1933,15 @@ static int tty_fasync(int fd, struct file * filp, int on) static int tiocsti(struct tty_struct *tty, char __user *p) { char ch, mbz = 0; - + struct tty_ldisc *ld; + if ((current->signal->tty != tty) && !capable(CAP_SYS_ADMIN)) return -EPERM; if (get_user(ch, p)) return -EFAULT; - tty->ldisc.receive_buf(tty, &ch, &mbz, 1); + ld = tty_ldisc_ref_wait(tty); + ld->receive_buf(tty, &ch, &mbz, 1); + tty_ldisc_deref(ld); return 0; } @@ -1609,8 +2024,6 @@ static int fionbio(struct file *file, int __user *p) static int tiocsctty(struct tty_struct *tty, int arg) { - struct list_head *l; - struct pid *pid; task_t *p; if (current->signal->leader && @@ -1633,8 +2046,9 @@ static int tiocsctty(struct tty_struct *tty, int arg) */ read_lock(&tasklist_lock); - for_each_task_pid(tty->session, PIDTYPE_SID, p, l, pid) + do_each_task_pid(tty->session, PIDTYPE_SID, p) { p->signal->tty = NULL; + } while_each_task_pid(tty->session, PIDTYPE_SID, p); read_unlock(&tasklist_lock); } else return -EPERM; @@ -1775,6 +2189,7 @@ int tty_ioctl(struct inode * inode, struct file * file, struct tty_struct *tty, *real_tty; void __user *p = (void __user *)arg; int retval; + struct tty_ldisc *ld; tty = (struct tty_struct *)file->private_data; if (tty_paranoia_check(tty, inode, "tty_ioctl")) @@ -1864,6 +2279,7 @@ int tty_ioctl(struct inode * inode, struct file * file, case TIOCGSID: return tiocgsid(tty, real_tty, p); case TIOCGETD: + /* FIXME: check this is ok */ return put_user(tty->ldisc.num, (int __user *)p); case TIOCSETD: return tiocsetd(tty, p); @@ -1902,16 +2318,19 @@ int tty_ioctl(struct inode * inode, struct file * file, return tty_tiocmset(tty, file, cmd, p); } if (tty->driver->ioctl) { - int retval = (tty->driver->ioctl)(tty, file, cmd, arg); + retval = (tty->driver->ioctl)(tty, file, cmd, arg); if (retval != -ENOIOCTLCMD) return retval; } - if (tty->ldisc.ioctl) { - int retval = (tty->ldisc.ioctl)(tty, file, cmd, arg); - if (retval != -ENOIOCTLCMD) - return retval; + ld = tty_ldisc_ref_wait(tty); + retval = -EINVAL; + if (ld->ioctl) { + retval = ld->ioctl(tty, file, cmd, arg); + if (retval == -ENOIOCTLCMD) + retval = -EINVAL; } - return -EINVAL; + tty_ldisc_deref(ld); + return retval; } @@ -1941,21 +2360,26 @@ static void __do_SAK(void *arg) #else struct tty_struct *tty = arg; struct task_struct *p; - struct list_head *l; - struct pid *pid; int session; int i; struct file *filp; + struct tty_ldisc *disc; if (!tty) return; session = tty->session; - if (tty->ldisc.flush_buffer) - tty->ldisc.flush_buffer(tty); + + /* We don't want an ldisc switch during this */ + disc = tty_ldisc_ref(tty); + if (disc && disc->flush_buffer) + disc->flush_buffer(tty); + tty_ldisc_deref(disc); + if (tty->driver->flush_buffer) tty->driver->flush_buffer(tty); + read_lock(&tasklist_lock); - for_each_task_pid(session, PIDTYPE_SID, p, l, pid) { + do_each_task_pid(session, PIDTYPE_SID, p) { if (p->signal->tty == tty || session > 0) { printk(KERN_NOTICE "SAK: killed process %d" " (%s): p->signal->session==tty->session\n", @@ -1982,7 +2406,7 @@ static void __do_SAK(void *arg) spin_unlock(&p->files->file_lock); } task_unlock(p); - } + } while_each_task_pid(session, PIDTYPE_SID, p); read_unlock(&tasklist_lock); #endif } @@ -2005,24 +2429,29 @@ EXPORT_SYMBOL(do_SAK); /* * This routine is called out of the software interrupt to flush data - * from the flip buffer to the line discipline. + * from the flip buffer to the line discipline. */ + static void flush_to_ldisc(void *private_) { struct tty_struct *tty = (struct tty_struct *) private_; unsigned char *cp; char *fp; int count; - unsigned long flags; + unsigned long flags; + struct tty_ldisc *disc; + + disc = tty_ldisc_ref(tty); + if (disc == NULL) /* !TTY_LDISC */ + return; if (test_bit(TTY_DONT_FLIP, &tty->flags)) { /* * Do it after the next timer tick: */ schedule_delayed_work(&tty->flip.work, 1); - return; + goto out; } - spin_lock_irqsave(&tty->read_lock, flags); if (tty->flip.buf_num) { cp = tty->flip.char_buf + TTY_FLIPBUF_SIZE; @@ -2041,7 +2470,31 @@ static void flush_to_ldisc(void *private_) tty->flip.count = 0; spin_unlock_irqrestore(&tty->read_lock, flags); - tty->ldisc.receive_buf(tty, cp, fp, count); + disc->receive_buf(tty, cp, fp, count); +out: + tty_ldisc_deref(disc); +} + +/* + * Call the ldisc flush directly from a driver. This function may + * return an error and need retrying by the user. + */ + +int tty_push_data(struct tty_struct *tty, unsigned char *cp, unsigned char *fp, int count) +{ + int ret = 0; + struct tty_ldisc *disc; + + disc = tty_ldisc_ref(tty); + if(test_bit(TTY_DONT_FLIP, &tty->flags)) + ret = -EAGAIN; + else if(disc == NULL) + ret = -EIO; + else + disc->receive_buf(tty, cp, fp, count); + tty_ldisc_deref(disc); + return ret; + } /* @@ -2063,9 +2516,20 @@ static int baud_table[] = { static int n_baud_table = ARRAY_SIZE(baud_table); +/** + * tty_termios_baud_rate + * @termios: termios structure + * + * Convert termios baud rate data into a speed. This should be called + * with the termios lock held if this termios is a terminal termios + * structure. May change the termios data. + */ + int tty_termios_baud_rate(struct termios *termios) { - unsigned int cbaud = termios->c_cflag & CBAUD; + unsigned int cbaud; + + cbaud = termios->c_cflag & CBAUD; if (cbaud & CBAUDEX) { cbaud &= ~CBAUDEX; @@ -2075,12 +2539,20 @@ int tty_termios_baud_rate(struct termios *termios) else cbaud += 15; } - return baud_table[cbaud]; } EXPORT_SYMBOL(tty_termios_baud_rate); +/** + * tty_get_baud_rate - get tty bit rates + * @tty: tty to query + * + * Returns the baud rate as an integer for this terminal. The + * termios lock must be held by the caller and the terminal bit + * flags may be updated. + */ + int tty_get_baud_rate(struct tty_struct *tty) { int baud = tty_termios_baud_rate(tty->termios); @@ -2099,6 +2571,17 @@ int tty_get_baud_rate(struct tty_struct *tty) EXPORT_SYMBOL(tty_get_baud_rate); +/** + * tty_flip_buffer_push - terminal + * @tty: tty to push + * + * Queue a push of the terminal flip buffers to the line discipline. This + * function must not be called from IRQ context if tty->low_latency is set. + * + * In the event of the queue being busy for flipping the work will be + * held off and retried later. + */ + void tty_flip_buffer_push(struct tty_struct *tty) { if (tty->low_latency) @@ -2116,12 +2599,13 @@ static void initialize_tty_struct(struct tty_struct *tty) { memset(tty, 0, sizeof(struct tty_struct)); tty->magic = TTY_MAGIC; - tty->ldisc = ldiscs[N_TTY]; + tty_ldisc_assign(tty, tty_ldisc_get(N_TTY)); tty->pgrp = -1; tty->flip.char_buf_ptr = tty->flip.char_buf; tty->flip.flag_buf_ptr = tty->flip.flag_buf; INIT_WORK(&tty->flip.work, flush_to_ldisc, tty); init_MUTEX(&tty->flip.pty_sem); + init_MUTEX(&tty->termios_sem); init_waitqueue_head(&tty->write_wait); init_waitqueue_head(&tty->read_wait); INIT_WORK(&tty->hangup_work, do_tty_hangup, tty); @@ -2157,6 +2641,7 @@ static struct class_simple *tty_class; void tty_register_device(struct tty_driver *driver, unsigned index, struct device *device) { + char name[64]; dev_t dev = MKDEV(driver->major, driver->minor_start) + index; if (index >= driver->num) { @@ -2168,13 +2653,11 @@ void tty_register_device(struct tty_driver *driver, unsigned index, devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR, "%s%d", driver->devfs_name, index + driver->name_base); - /* we don't care about the ptys */ - /* how nice to hide this behind some crappy interface.. */ - if (driver->type != TTY_DRIVER_TYPE_PTY) { - char name[64]; + if (driver->type == TTY_DRIVER_TYPE_PTY) + pty_line_name(driver, index, name); + else tty_line_name(driver, index, name); - class_simple_device_add(tty_class, dev, device, name); - } + class_simple_device_add(tty_class, dev, device, name); } /** @@ -2444,7 +2927,7 @@ static int __init tty_init(void) class_simple_device_add(tty_class, MKDEV(TTYAUX_MAJOR, 1), NULL, "console"); #ifdef CONFIG_UNIX98_PTYS - cdev_init(&ptmx_cdev, &tty_fops); + cdev_init(&ptmx_cdev, &ptmx_fops); if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) || register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) panic("Couldn't register /dev/ptmx driver\n"); diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/Makefile b/linux-2.6.9-xen-sparse/drivers/xen/Makefile similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/Makefile rename to linux-2.6.9-xen-sparse/drivers/xen/Makefile diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/balloon/Makefile b/linux-2.6.9-xen-sparse/drivers/xen/balloon/Makefile similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/balloon/Makefile rename to linux-2.6.9-xen-sparse/drivers/xen/balloon/Makefile diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/balloon/balloon.c b/linux-2.6.9-xen-sparse/drivers/xen/balloon/balloon.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/balloon/balloon.c rename to linux-2.6.9-xen-sparse/drivers/xen/balloon/balloon.c diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/blkback/Makefile b/linux-2.6.9-xen-sparse/drivers/xen/blkback/Makefile similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/blkback/Makefile rename to linux-2.6.9-xen-sparse/drivers/xen/blkback/Makefile diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/blkback/blkback.c b/linux-2.6.9-xen-sparse/drivers/xen/blkback/blkback.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/blkback/blkback.c rename to linux-2.6.9-xen-sparse/drivers/xen/blkback/blkback.c diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/blkback/common.h b/linux-2.6.9-xen-sparse/drivers/xen/blkback/common.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/blkback/common.h rename to linux-2.6.9-xen-sparse/drivers/xen/blkback/common.h diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/blkback/control.c b/linux-2.6.9-xen-sparse/drivers/xen/blkback/control.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/blkback/control.c rename to linux-2.6.9-xen-sparse/drivers/xen/blkback/control.c diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/blkback/interface.c b/linux-2.6.9-xen-sparse/drivers/xen/blkback/interface.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/blkback/interface.c rename to linux-2.6.9-xen-sparse/drivers/xen/blkback/interface.c diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/blkback/vbd.c b/linux-2.6.9-xen-sparse/drivers/xen/blkback/vbd.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/blkback/vbd.c rename to linux-2.6.9-xen-sparse/drivers/xen/blkback/vbd.c diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/Kconfig b/linux-2.6.9-xen-sparse/drivers/xen/blkfront/Kconfig similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/Kconfig rename to linux-2.6.9-xen-sparse/drivers/xen/blkfront/Kconfig diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/Makefile b/linux-2.6.9-xen-sparse/drivers/xen/blkfront/Makefile similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/Makefile rename to linux-2.6.9-xen-sparse/drivers/xen/blkfront/Makefile diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/blkfront.c b/linux-2.6.9-xen-sparse/drivers/xen/blkfront/blkfront.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/blkfront.c rename to linux-2.6.9-xen-sparse/drivers/xen/blkfront/blkfront.c diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/block.h b/linux-2.6.9-xen-sparse/drivers/xen/blkfront/block.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/block.h rename to linux-2.6.9-xen-sparse/drivers/xen/blkfront/block.h diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/vbd.c b/linux-2.6.9-xen-sparse/drivers/xen/blkfront/vbd.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/blkfront/vbd.c rename to linux-2.6.9-xen-sparse/drivers/xen/blkfront/vbd.c diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/console/Makefile b/linux-2.6.9-xen-sparse/drivers/xen/console/Makefile similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/console/Makefile rename to linux-2.6.9-xen-sparse/drivers/xen/console/Makefile diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/console/console.c b/linux-2.6.9-xen-sparse/drivers/xen/console/console.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/console/console.c rename to linux-2.6.9-xen-sparse/drivers/xen/console/console.c diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/evtchn/Makefile b/linux-2.6.9-xen-sparse/drivers/xen/evtchn/Makefile similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/evtchn/Makefile rename to linux-2.6.9-xen-sparse/drivers/xen/evtchn/Makefile diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/evtchn/evtchn.c b/linux-2.6.9-xen-sparse/drivers/xen/evtchn/evtchn.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/evtchn/evtchn.c rename to linux-2.6.9-xen-sparse/drivers/xen/evtchn/evtchn.c diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/netback/Makefile b/linux-2.6.9-xen-sparse/drivers/xen/netback/Makefile similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/netback/Makefile rename to linux-2.6.9-xen-sparse/drivers/xen/netback/Makefile diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/netback/common.h b/linux-2.6.9-xen-sparse/drivers/xen/netback/common.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/netback/common.h rename to linux-2.6.9-xen-sparse/drivers/xen/netback/common.h diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/netback/control.c b/linux-2.6.9-xen-sparse/drivers/xen/netback/control.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/netback/control.c rename to linux-2.6.9-xen-sparse/drivers/xen/netback/control.c diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/netback/interface.c b/linux-2.6.9-xen-sparse/drivers/xen/netback/interface.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/netback/interface.c rename to linux-2.6.9-xen-sparse/drivers/xen/netback/interface.c diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/netback/netback.c b/linux-2.6.9-xen-sparse/drivers/xen/netback/netback.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/netback/netback.c rename to linux-2.6.9-xen-sparse/drivers/xen/netback/netback.c diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/Kconfig b/linux-2.6.9-xen-sparse/drivers/xen/netfront/Kconfig similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/netfront/Kconfig rename to linux-2.6.9-xen-sparse/drivers/xen/netfront/Kconfig diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/Makefile b/linux-2.6.9-xen-sparse/drivers/xen/netfront/Makefile similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/netfront/Makefile rename to linux-2.6.9-xen-sparse/drivers/xen/netfront/Makefile diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6.9-xen-sparse/drivers/xen/netfront/netfront.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/netfront/netfront.c rename to linux-2.6.9-xen-sparse/drivers/xen/netfront/netfront.c diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/privcmd/Makefile b/linux-2.6.9-xen-sparse/drivers/xen/privcmd/Makefile similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/privcmd/Makefile rename to linux-2.6.9-xen-sparse/drivers/xen/privcmd/Makefile diff --git a/linux-2.6.8.1-xen-sparse/drivers/xen/privcmd/privcmd.c b/linux-2.6.9-xen-sparse/drivers/xen/privcmd/privcmd.c similarity index 100% rename from linux-2.6.8.1-xen-sparse/drivers/xen/privcmd/privcmd.c rename to linux-2.6.9-xen-sparse/drivers/xen/privcmd/privcmd.c diff --git a/linux-2.6.8.1-xen-sparse/include/asm-generic/pgtable.h b/linux-2.6.9-xen-sparse/include/asm-generic/pgtable.h similarity index 92% rename from linux-2.6.8.1-xen-sparse/include/asm-generic/pgtable.h rename to linux-2.6.9-xen-sparse/include/asm-generic/pgtable.h index e7d6c37eea..59563e99c7 100644 --- a/linux-2.6.8.1-xen-sparse/include/asm-generic/pgtable.h +++ b/linux-2.6.9-xen-sparse/include/asm-generic/pgtable.h @@ -13,11 +13,19 @@ * Note: the old pte is known to not be writable, so we don't need to * worry about dirty bits etc getting lost. */ +#ifndef __HAVE_ARCH_SET_PTE_ATOMIC #define ptep_establish(__vma, __address, __ptep, __entry) \ do { \ set_pte(__ptep, __entry); \ flush_tlb_page(__vma, __address); \ } while (0) +#else /* __HAVE_ARCH_SET_PTE_ATOMIC */ +#define ptep_establish(__vma, __address, __ptep, __entry) \ +do { \ + set_pte_atomic(__ptep, __entry); \ + flush_tlb_page(__vma, __address); \ +} while (0) +#endif /* __HAVE_ARCH_SET_PTE_ATOMIC */ #endif #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/desc.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/desc.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/desc.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/desc.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h similarity index 91% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h index a865309a33..43b4f5780b 100644 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h @@ -1,7 +1,6 @@ #ifndef _ASM_I386_DMA_MAPPING_H #define _ASM_I386_DMA_MAPPING_H -#include #include #include @@ -163,4 +162,16 @@ dma_cache_sync(void *vaddr, size_t size, flush_write_buffers(); } +#define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY +extern int +dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, + dma_addr_t device_addr, size_t size, int flags); + +extern void +dma_release_declared_memory(struct device *dev); + +extern void * +dma_mark_declared_memory_occupied(struct device *dev, + dma_addr_t device_addr, size_t size); + #endif diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/fixmap.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/fixmap.h similarity index 94% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/fixmap.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/fixmap.h index 89b3ba6532..794a6cd9a7 100644 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/fixmap.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/fixmap.h @@ -14,6 +14,15 @@ #define _ASM_FIXMAP_H #include + +/* used by vmalloc.c, vsyscall.lds.S. + * + * Leave one empty page between vmalloc'ed areas and + * the start of the fixmap. + */ +#define __FIXADDR_TOP (HYPERVISOR_VIRT_START - 2 * PAGE_SIZE) + +#ifndef __ASSEMBLY__ #include #include #include @@ -110,13 +119,8 @@ extern void __set_fixmap_ma (enum fixed_addresses idx, #define clear_fixmap(idx) \ __set_fixmap(idx, 0, __pgprot(0)) -/* - * used by vmalloc.c. - * - * Leave one empty page between vmalloc'ed areas and - * the start of the fixmap. - */ -#define FIXADDR_TOP (HYPERVISOR_VIRT_START - 2 * PAGE_SIZE) +#define FIXADDR_TOP ((unsigned long)__FIXADDR_TOP) + #define __FIXADDR_SIZE (__end_of_permanent_fixed_addresses << PAGE_SHIFT) #define FIXADDR_START (FIXADDR_TOP - __FIXADDR_SIZE) @@ -138,7 +142,7 @@ extern void __this_fixmap_does_not_exist(void); * directly without tranlation, we catch the bug with a NULL-deference * kernel oops. Illegal ranges of incoming indices are caught too. */ -static inline unsigned long fix_to_virt(const unsigned int idx) +static __always_inline unsigned long fix_to_virt(const unsigned int idx) { /* * this branch gets completely eliminated after inlining, @@ -161,4 +165,5 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr) return __virt_to_fix(vaddr); } +#endif /* !__ASSEMBLY__ */ #endif diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/highmem.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/highmem.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/highmem.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/highmem.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/io.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/io.h similarity index 87% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/io.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/io.h index db076b4370..0a2de0bb92 100644 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/io.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/io.h @@ -2,6 +2,8 @@ #define _ASM_IO_H #include +#include +#include /* * This file contains the definitions for the x86 IO instructions @@ -43,6 +45,8 @@ #ifdef __KERNEL__ +#include + #include #include @@ -95,7 +99,7 @@ static inline void * phys_to_virt(unsigned long address) (((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2))) && \ ((bvec_to_pseudophys((vec1)) + (vec1)->bv_len) == bvec_to_pseudophys((vec2)))) -extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); +extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); /** * ioremap - map bus memory into CPU space @@ -109,13 +113,13 @@ extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long * address. */ -static inline void * ioremap (unsigned long offset, unsigned long size) +static inline void __iomem * ioremap(unsigned long offset, unsigned long size) { return __ioremap(offset, size, 0); } -extern void * ioremap_nocache (unsigned long offset, unsigned long size); -extern void iounmap(void *addr); +extern void __iomem * ioremap_nocache(unsigned long offset, unsigned long size); +extern void iounmap(volatile void __iomem *addr); /* * bt_ioremap() and bt_iounmap() are for temporary early boot-time @@ -152,9 +156,18 @@ extern void bt_iounmap(void *addr, unsigned long size); * memory location directly. */ -#define readb(addr) (*(volatile unsigned char *) (addr)) -#define readw(addr) (*(volatile unsigned short *) (addr)) -#define readl(addr) (*(volatile unsigned int *) (addr)) +static inline unsigned char readb(const volatile void __iomem *addr) +{ + return *(volatile unsigned char __force *) addr; +} +static inline unsigned short readw(const volatile void __iomem *addr) +{ + return *(volatile unsigned short __force *) addr; +} +static inline unsigned int readl(const volatile void __iomem *addr) +{ + return *(volatile unsigned int __force *) addr; +} #define readb_relaxed(addr) readb(addr) #define readw_relaxed(addr) readw(addr) #define readl_relaxed(addr) readl(addr) @@ -162,16 +175,34 @@ extern void bt_iounmap(void *addr, unsigned long size); #define __raw_readw readw #define __raw_readl readl -#define writeb(b,addr) (*(volatile unsigned char *) (addr) = (b)) -#define writew(b,addr) (*(volatile unsigned short *) (addr) = (b)) -#define writel(b,addr) (*(volatile unsigned int *) (addr) = (b)) +static inline void writeb(unsigned char b, volatile void __iomem *addr) +{ + *(volatile unsigned char __force *) addr = b; +} +static inline void writew(unsigned short b, volatile void __iomem *addr) +{ + *(volatile unsigned short __force *) addr = b; +} +static inline void writel(unsigned int b, volatile void __iomem *addr) +{ + *(volatile unsigned int __force *) addr = b; +} #define __raw_writeb writeb #define __raw_writew writew #define __raw_writel writel -#define memset_io(a,b,c) memset((void *)(a),(b),(c)) -#define memcpy_fromio(a,b,c) __memcpy((a),(void *)(b),(c)) -#define memcpy_toio(a,b,c) __memcpy((void *)(a),(b),(c)) +static inline void memset_io(volatile void __iomem *addr, unsigned char val, int count) +{ + memset((void __force *) addr, val, count); +} +static inline void memcpy_fromio(void *dst, volatile void __iomem *src, int count) +{ + __memcpy(dst, (void __force *) src, count); +} +static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int count) +{ + __memcpy((void __force *) dst, src, count); +} /* * ISA space is 'always mapped' on a typical x86 system, no need to @@ -181,7 +212,7 @@ extern void bt_iounmap(void *addr, unsigned long size); * used as the IO-area pointer (it can be iounmapped as well, so the * analogy with PCI is quite large): */ -#define __ISA_IO_base ((char *)(PAGE_OFFSET)) +#define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET)) #define isa_readb(a) readb(__ISA_IO_base + (a)) #define isa_readw(a) readw(__ISA_IO_base + (a)) @@ -198,8 +229,8 @@ extern void bt_iounmap(void *addr, unsigned long size); * Again, i386 does not require mem IO specific function. */ -#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(b),(c),(d)) -#define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(__ISA_IO_base + (b)),(c),(d)) +#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(b),(c),(d)) +#define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(__ISA_IO_base + (b)),(c),(d)) /** * check_signature - find BIOS signatures @@ -212,7 +243,7 @@ extern void bt_iounmap(void *addr, unsigned long size); * Returns 1 on a match. */ -static inline int check_signature(unsigned long io_addr, +static inline int check_signature(volatile void __iomem * io_addr, const unsigned char *signature, int length) { int retval = 0; diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/do_timer.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/do_timer.h similarity index 98% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/do_timer.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/do_timer.h index 565ba968cd..e79ce71c19 100644 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/do_timer.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/do_timer.h @@ -23,7 +23,7 @@ static inline void do_timer_interrupt_hook(struct pt_regs *regs) */ #ifndef CONFIG_X86_LOCAL_APIC if (regs) - x86_do_profile(regs); + profile_tick(CPU_PROFILING, regs); #else if (regs && !using_apic_timer) smp_local_timer_interrupt(regs); diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/io_ports.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/io_ports.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/io_ports.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/io_ports.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_mpspec.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_mpspec.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_mpspec.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_mpspec.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_reboot.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_reboot.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_reboot.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_reboot.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_time.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_time.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_time.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_time.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_timer.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_timer.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_timer.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_timer.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_traps.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_traps.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_traps.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/mach_traps.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/pci-functions.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/pci-functions.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/pci-functions.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/pci-functions.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mmu_context.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mmu_context.h similarity index 82% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mmu_context.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mmu_context.h index 223c7192c6..159310f1be 100644 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/mmu_context.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mmu_context.h @@ -18,8 +18,8 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) { #ifdef CONFIG_SMP unsigned cpu = smp_processor_id(); - if (cpu_tlbstate[cpu].state == TLBSTATE_OK) - cpu_tlbstate[cpu].state = TLBSTATE_LAZY; + if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK) + per_cpu(cpu_tlbstate, cpu).state = TLBSTATE_LAZY; #endif } @@ -33,8 +33,8 @@ static inline void switch_mm(struct mm_struct *prev, /* stop flush ipis for the previous mm */ cpu_clear(cpu, prev->cpu_vm_mask); #ifdef CONFIG_SMP - cpu_tlbstate[cpu].state = TLBSTATE_OK; - cpu_tlbstate[cpu].active_mm = next; + per_cpu(cpu_tlbstate, cpu).state = TLBSTATE_OK; + per_cpu(cpu_tlbstate, cpu).active_mm = next; #endif cpu_set(cpu, next->cpu_vm_mask); @@ -49,8 +49,8 @@ static inline void switch_mm(struct mm_struct *prev, } #ifdef CONFIG_SMP else { - cpu_tlbstate[cpu].state = TLBSTATE_OK; - BUG_ON(cpu_tlbstate[cpu].active_mm != next); + per_cpu(cpu_tlbstate, cpu).state = TLBSTATE_OK; + BUG_ON(per_cpu(cpu_tlbstate, cpu).active_mm != next); if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) { /* We were in lazy tlb mode and leave_mm disabled diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/msr.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/msr.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/msr.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/msr.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/page.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/page.h similarity index 98% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/page.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/page.h index ce9a1c6cf3..34e8f7f9eb 100644 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/page.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/page.h @@ -144,13 +144,13 @@ static inline pmd_t __pmd(unsigned long x) * and CONFIG_HIGHMEM64G options in the kernel configuration. */ +#ifndef __ASSEMBLY__ + /* * This much address space is reserved for vmalloc() and iomap() * as well as fixmap mappings. */ -#define __VMALLOC_RESERVE (128 << 20) - -#ifndef __ASSEMBLY__ +extern unsigned int __VMALLOC_RESERVE; /* Pure 2^n version of get_order */ static __inline__ int get_order(unsigned long size) @@ -166,6 +166,8 @@ static __inline__ int get_order(unsigned long size) return order; } +extern int sysctl_legacy_va_layout; + #endif /* __ASSEMBLY__ */ /* diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/param.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/param.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/param.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/param.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pci.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pci.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pci.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pci.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pgalloc.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgalloc.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pgalloc.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgalloc.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h similarity index 93% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h index 1defe99a79..aa23bd9d55 100644 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h @@ -130,4 +130,11 @@ static inline int pte_exec_kernel(pte_t pte) #define pgoff_to_pte(off) \ ((pte_t) { (((off) & 0x1f) << 1) + (((off) >> 5) << 8) + _PAGE_FILE }) +/* Encode and de-code a swap entry */ +#define __swp_type(x) (((x).val >> 1) & 0x1f) +#define __swp_offset(x) ((x).val >> 8) +#define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) }) +#define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_low }) +#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) + #endif /* _I386_PGTABLE_2LEVEL_H */ diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pgtable.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable.h similarity index 98% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pgtable.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable.h index 3c722ee573..67325a0262 100644 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/pgtable.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable.h @@ -464,13 +464,6 @@ do { \ } \ } while (0) -/* Encode and de-code a swap entry */ -#define __swp_type(x) (((x).val >> 1) & 0x1f) -#define __swp_offset(x) ((x).val >> 8) -#define __swp_entry(type, offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) }) -#define __pte_to_swp_entry(pte) ((swp_entry_t) { (pte).pte_low }) -#define __swp_entry_to_pte(x) ((pte_t) { (x).val }) - /* NOTE: make_page* callers must call flush_page_update_queue() */ static inline void __make_page_readonly(void *va) { diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/processor.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/processor.h similarity index 97% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/processor.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/processor.h index 0d1860fe6b..e1aaf0020f 100644 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/processor.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/processor.h @@ -19,6 +19,7 @@ #include #include #include +#include /* flag for disabling the tsc */ extern int tsc_disable; @@ -84,8 +85,8 @@ struct cpuinfo_x86 { extern struct cpuinfo_x86 boot_cpu_data; extern struct cpuinfo_x86 new_cpu_data; -extern struct tss_struct init_tss[NR_CPUS]; extern struct tss_struct doublefault_tss; +DECLARE_PER_CPU(struct tss_struct, init_tss); extern pgd_t *cur_pgd; /* XXXsmp */ #ifdef CONFIG_SMP @@ -307,6 +308,8 @@ extern unsigned int mca_pentium_flag; */ #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) +#define HAVE_ARCH_PICK_MMAP_LAYOUT + /* * Size of io_bitmap. */ @@ -315,6 +318,7 @@ extern unsigned int mca_pentium_flag; #define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long)) #define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap) #define INVALID_IO_BITMAP_OFFSET 0x8000 +#define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000 struct i387_fsave_struct { long cwd; @@ -368,6 +372,8 @@ typedef struct { unsigned long seg; } mm_segment_t; +struct thread_struct; + struct tss_struct { unsigned short back_link,__blh; unsigned long esp0; @@ -399,10 +405,15 @@ struct tss_struct { * be within the limit. */ unsigned long io_bitmap[IO_BITMAP_LONGS + 1]; + /* + * Cache the current maximum and the last task that used the bitmap: + */ + unsigned long io_bitmap_max; + struct thread_struct *io_bitmap_owner; /* * pads the TSS to be cacheline-aligned (size is 0x100) */ - unsigned long __cacheline_filler[37]; + unsigned long __cacheline_filler[35]; /* * .. and then another 0x100 bytes for emergency kernel stack */ @@ -434,6 +445,8 @@ struct thread_struct { unsigned int saved_fs, saved_gs; /* IO permissions */ unsigned long *io_bitmap_ptr; +/* max allowed port in the bitmap, in bytes: */ + unsigned long io_bitmap_max; }; #define INIT_THREAD { \ @@ -451,7 +464,6 @@ struct thread_struct { #define INIT_TSS { \ .esp0 = sizeof(init_stack) + (long)&init_stack, \ .ss0 = __KERNEL_DS, \ - .esp1 = sizeof(init_tss[0]) + (long)&init_tss[0], \ .ss1 = __KERNEL_CS, \ .ldt = GDT_ENTRY_LDT, \ .io_bitmap_base = INVALID_IO_BITMAP_OFFSET, \ @@ -658,9 +670,4 @@ extern void select_idle_routine(const struct cpuinfo_x86 *c); #define cache_line_size() (boot_cpu_data.x86_cache_alignment) -#ifdef CONFIG_SCHED_SMT -#define ARCH_HAS_SCHED_DOMAIN -#define ARCH_HAS_SCHED_WAKE_IDLE -#endif - #endif /* __ASM_I386_PROCESSOR_H */ diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/ptrace.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/ptrace.h similarity index 87% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/ptrace.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/ptrace.h index 0165ccc542..2036837c50 100644 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/ptrace.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/ptrace.h @@ -57,6 +57,11 @@ struct pt_regs { #ifdef __KERNEL__ #define user_mode(regs) ((VM_MASK & (regs)->eflags) || (2 & (regs)->xcs)) #define instruction_pointer(regs) ((regs)->eip) +#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) +extern unsigned long profile_pc(struct pt_regs *regs); +#else +#define profile_pc(regs) instruction_pointer(regs) +#endif #endif #endif diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/segment.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/segment.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/segment.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/segment.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/setup.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/setup.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/setup.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/setup.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/system.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/system.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/system.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/system.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/timer.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/timer.h similarity index 98% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/timer.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/timer.h index add9f206ba..e478d7dfdb 100644 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/timer.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/timer.h @@ -28,6 +28,7 @@ struct timer_opts{ extern struct timer_opts* select_timer(void); extern void clock_fallback(void); +void setup_pit_timer(void); /* Modifiers for buggy PIT handling */ diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/tlbflush.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/tlbflush.h similarity index 98% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/tlbflush.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/tlbflush.h index bb1c124907..14030f9a04 100644 --- a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/tlbflush.h +++ b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/tlbflush.h @@ -105,7 +105,7 @@ struct tlb_state int state; char __cacheline_padding[L1_CACHE_BYTES-8]; }; -extern struct tlb_state cpu_tlbstate[NR_CPUS]; +DECLARE_PER_CPU(struct tlb_state, cpu_tlbstate); #endif diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/vga.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/vga.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/vga.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/vga.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/xor.h b/linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/xor.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/asm-i386/xor.h rename to linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/xor.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/ctrl_if.h b/linux-2.6.9-xen-sparse/include/asm-xen/ctrl_if.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/ctrl_if.h rename to linux-2.6.9-xen-sparse/include/asm-xen/ctrl_if.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/evtchn.h b/linux-2.6.9-xen-sparse/include/asm-xen/evtchn.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/evtchn.h rename to linux-2.6.9-xen-sparse/include/asm-xen/evtchn.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/gnttab.h b/linux-2.6.9-xen-sparse/include/asm-xen/gnttab.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/gnttab.h rename to linux-2.6.9-xen-sparse/include/asm-xen/gnttab.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/hypervisor.h b/linux-2.6.9-xen-sparse/include/asm-xen/hypervisor.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/hypervisor.h rename to linux-2.6.9-xen-sparse/include/asm-xen/hypervisor.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/multicall.h b/linux-2.6.9-xen-sparse/include/asm-xen/multicall.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/multicall.h rename to linux-2.6.9-xen-sparse/include/asm-xen/multicall.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/proc_cmd.h b/linux-2.6.9-xen-sparse/include/asm-xen/proc_cmd.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/proc_cmd.h rename to linux-2.6.9-xen-sparse/include/asm-xen/proc_cmd.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/queues.h b/linux-2.6.9-xen-sparse/include/asm-xen/queues.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/queues.h rename to linux-2.6.9-xen-sparse/include/asm-xen/queues.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/suspend.h b/linux-2.6.9-xen-sparse/include/asm-xen/suspend.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/suspend.h rename to linux-2.6.9-xen-sparse/include/asm-xen/suspend.h diff --git a/linux-2.6.8.1-xen-sparse/include/asm-xen/xen_proc.h b/linux-2.6.9-xen-sparse/include/asm-xen/xen_proc.h similarity index 100% rename from linux-2.6.8.1-xen-sparse/include/asm-xen/xen_proc.h rename to linux-2.6.9-xen-sparse/include/asm-xen/xen_proc.h diff --git a/linux-2.6.8.1-xen-sparse/include/linux/bio.h b/linux-2.6.9-xen-sparse/include/linux/bio.h similarity index 98% rename from linux-2.6.8.1-xen-sparse/include/linux/bio.h rename to linux-2.6.9-xen-sparse/include/linux/bio.h index 069345e5b3..1f2f504d79 100644 --- a/linux-2.6.8.1-xen-sparse/include/linux/bio.h +++ b/linux-2.6.9-xen-sparse/include/linux/bio.h @@ -121,6 +121,7 @@ struct bio { #define BIO_CLONED 4 /* doesn't own data */ #define BIO_BOUNCED 5 /* bio is a bounce bio */ #define BIO_USER_MAPPED 6 /* contains user pages */ +#define BIO_EOPNOTSUPP 7 /* not supported */ #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag))) /* @@ -160,6 +161,8 @@ struct bio { #define bio_data(bio) (page_address(bio_page((bio))) + bio_offset((bio))) #define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER)) #define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC)) +#define bio_failfast(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST)) +#define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD)) /* * will die diff --git a/linux-2.6.8.1-xen-sparse/include/linux/page-flags.h b/linux-2.6.9-xen-sparse/include/linux/page-flags.h similarity index 97% rename from linux-2.6.8.1-xen-sparse/include/linux/page-flags.h rename to linux-2.6.9-xen-sparse/include/linux/page-flags.h index fdf0d3f8ec..9e4cd6d6d4 100644 --- a/linux-2.6.8.1-xen-sparse/include/linux/page-flags.h +++ b/linux-2.6.9-xen-sparse/include/linux/page-flags.h @@ -69,14 +69,12 @@ #define PG_private 12 /* Has something at ->private */ #define PG_writeback 13 /* Page is under writeback */ #define PG_nosave 14 /* Used for system suspend/resume */ -#define PG_maplock 15 /* Lock bit for rmap to ptes */ +#define PG_compound 15 /* Part of a compound page */ #define PG_swapcache 16 /* Swap page: swp_entry_t in private */ #define PG_mappedtodisk 17 /* Has blocks allocated on-disk */ #define PG_reclaim 18 /* To be reclaimed asap */ -#define PG_compound 19 /* Part of a compound page */ -#define PG_anon 20 /* Anonymous: anon_vma in mapping */ #define PG_foreign 21 /* Page belongs to foreign allocator */ @@ -237,6 +235,7 @@ extern unsigned long __read_page_state(unsigned offset); #define PageReserved(page) test_bit(PG_reserved, &(page)->flags) #define SetPageReserved(page) set_bit(PG_reserved, &(page)->flags) #define ClearPageReserved(page) clear_bit(PG_reserved, &(page)->flags) +#define __ClearPageReserved(page) __clear_bit(PG_reserved, &(page)->flags) #define SetPagePrivate(page) set_bit(PG_private, &(page)->flags) #define ClearPagePrivate(page) clear_bit(PG_private, &(page)->flags) @@ -293,10 +292,6 @@ extern unsigned long __read_page_state(unsigned offset); #define SetPageCompound(page) set_bit(PG_compound, &(page)->flags) #define ClearPageCompound(page) clear_bit(PG_compound, &(page)->flags) -#define PageAnon(page) test_bit(PG_anon, &(page)->flags) -#define SetPageAnon(page) set_bit(PG_anon, &(page)->flags) -#define ClearPageAnon(page) clear_bit(PG_anon, &(page)->flags) - /* A foreign page uses a custom destructor rather than the buddy allocator. */ #ifdef CONFIG_FOREIGN_PAGES #define PageForeign(page) test_bit(PG_foreign, &(page)->flags) diff --git a/linux-2.6.8.1-xen-sparse/include/linux/skbuff.h b/linux-2.6.9-xen-sparse/include/linux/skbuff.h similarity index 97% rename from linux-2.6.8.1-xen-sparse/include/linux/skbuff.h rename to linux-2.6.9-xen-sparse/include/linux/skbuff.h index 3319d01161..57a2843faa 100644 --- a/linux-2.6.8.1-xen-sparse/include/linux/skbuff.h +++ b/linux-2.6.9-xen-sparse/include/linux/skbuff.h @@ -89,16 +89,14 @@ #define NET_CALLER(arg) __builtin_return_address(0) #endif +struct net_device; + #ifdef CONFIG_NETFILTER struct nf_conntrack { atomic_t use; void (*destroy)(struct nf_conntrack *); }; -struct nf_ct_info { - struct nf_conntrack *master; -}; - #ifdef CONFIG_BRIDGE_NETFILTER struct nf_bridge_info { atomic_t use; @@ -184,6 +182,7 @@ struct skb_shared_info { * @nfmark: Can be used for communication between hooks * @nfcache: Cache info * @nfct: Associated connection, if any + * @nfctinfo: Relationship of this skb to the connection * @nf_debug: Netfilter debugging * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c * @private: Data which is private to the HIPPI implementation @@ -220,7 +219,6 @@ struct sk_buff { } nh; union { - struct ethhdr *ethernet; unsigned char *raw; } mac; @@ -251,7 +249,8 @@ struct sk_buff { #ifdef CONFIG_NETFILTER unsigned long nfmark; __u32 nfcache; - struct nf_ct_info *nfct; + __u32 nfctinfo; + struct nf_conntrack *nfct; #ifdef CONFIG_NETFILTER_DEBUG unsigned int nf_debug; #endif @@ -269,7 +268,7 @@ struct sk_buff { #ifdef CONFIG_NET_CLS_ACT __u32 tc_verd; /* traffic control verdict */ __u32 tc_classid; /* traffic control classid */ - #endif +#endif #endif @@ -1111,6 +1110,20 @@ extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); extern void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len); +static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, + int len, void *buffer) +{ + int hlen = skb_headlen(skb); + + if (offset + len <= hlen) + return skb->data + offset; + + if (skb_copy_bits(skb, offset, buffer, len) < 0) + return NULL; + + return buffer; +} + extern void skb_init(void); extern void skb_add_mtu(int mtu); @@ -1131,15 +1144,15 @@ extern int skb_iter_next(const struct sk_buff *skb, struct skb_iter *i); extern void skb_iter_abort(const struct sk_buff *skb, struct skb_iter *i); #ifdef CONFIG_NETFILTER -static inline void nf_conntrack_put(struct nf_ct_info *nfct) +static inline void nf_conntrack_put(struct nf_conntrack *nfct) { - if (nfct && atomic_dec_and_test(&nfct->master->use)) - nfct->master->destroy(nfct->master); + if (nfct && atomic_dec_and_test(&nfct->use)) + nfct->destroy(nfct); } -static inline void nf_conntrack_get(struct nf_ct_info *nfct) +static inline void nf_conntrack_get(struct nf_conntrack *nfct) { if (nfct) - atomic_inc(&nfct->master->use); + atomic_inc(&nfct->use); } static inline void nf_reset(struct sk_buff *skb) { @@ -1149,6 +1162,12 @@ static inline void nf_reset(struct sk_buff *skb) skb->nf_debug = 0; #endif } +static inline void nf_reset_debug(struct sk_buff *skb) +{ +#ifdef CONFIG_NETFILTER_DEBUG + skb->nf_debug = 0; +#endif +} #ifdef CONFIG_BRIDGE_NETFILTER static inline void nf_bridge_put(struct nf_bridge_info *nf_bridge) diff --git a/linux-2.6.8.1-xen-sparse/mkbuildtree b/linux-2.6.9-xen-sparse/mkbuildtree similarity index 100% rename from linux-2.6.8.1-xen-sparse/mkbuildtree rename to linux-2.6.9-xen-sparse/mkbuildtree diff --git a/linux-2.6.8.1-xen-sparse/mm/memory.c b/linux-2.6.9-xen-sparse/mm/memory.c similarity index 99% rename from linux-2.6.8.1-xen-sparse/mm/memory.c rename to linux-2.6.9-xen-sparse/mm/memory.c index d1f64fccd4..ffd40c5efe 100644 --- a/linux-2.6.8.1-xen-sparse/mm/memory.c +++ b/linux-2.6.9-xen-sparse/mm/memory.c @@ -1123,12 +1123,12 @@ no_new_page: static inline void unmap_mapping_range_list(struct prio_tree_root *root, struct zap_details *details) { - struct vm_area_struct *vma = NULL; + struct vm_area_struct *vma; struct prio_tree_iter iter; pgoff_t vba, vea, zba, zea; - while ((vma = vma_prio_tree_next(vma, root, &iter, - details->first_index, details->last_index)) != NULL) { + vma_prio_tree_foreach(vma, &iter, root, + details->first_index, details->last_index) { vba = vma->vm_pgoff; vea = vba + ((vma->vm_end - vma->vm_start) >> PAGE_SHIFT) - 1; /* Assume for now that PAGE_CACHE_SHIFT == PAGE_SHIFT */ @@ -1351,6 +1351,7 @@ static int do_swap_page(struct mm_struct * mm, /* Had to read the page from swap area: Major fault */ ret = VM_FAULT_MAJOR; inc_page_state(pgmajfault); + grab_swap_token(); } mark_page_accessed(page); @@ -1743,6 +1744,8 @@ int make_pages_present(unsigned long addr, unsigned long end) struct vm_area_struct * vma; vma = find_vma(current->mm, addr); + if (!vma) + return -1; write = (vma->vm_flags & VM_WRITE) != 0; if (addr >= end) BUG(); diff --git a/linux-2.6.8.1-xen-sparse/mm/page_alloc.c b/linux-2.6.9-xen-sparse/mm/page_alloc.c similarity index 88% rename from linux-2.6.8.1-xen-sparse/mm/page_alloc.c rename to linux-2.6.9-xen-sparse/mm/page_alloc.c index 166246de9a..9d560ae4c7 100644 --- a/linux-2.6.8.1-xen-sparse/mm/page_alloc.c +++ b/linux-2.6.9-xen-sparse/mm/page_alloc.c @@ -55,8 +55,8 @@ EXPORT_SYMBOL(zone_table); static char *zone_names[MAX_NR_ZONES] = { "DMA", "Normal", "HighMem" }; int min_free_kbytes = 1024; -static unsigned long __initdata nr_kernel_pages; -static unsigned long __initdata nr_all_pages; +unsigned long __initdata nr_kernel_pages; +unsigned long __initdata nr_all_pages; /* * Temporary debugging check for pages not lying within a given zone. @@ -76,9 +76,9 @@ static void bad_page(const char *function, struct page *page) { printk(KERN_EMERG "Bad page state at %s (in process '%s', page %p)\n", function, current->comm, page); - printk(KERN_EMERG "flags:0x%08lx mapping:%p mapcount:%d count:%d\n", - (unsigned long)page->flags, page->mapping, - (int)page->mapcount, page_count(page)); + printk(KERN_EMERG "flags:0x%0*lx mapping:%p mapcount:%d count:%d\n", + (int)(2*sizeof(page_flags_t)), (unsigned long)page->flags, + page->mapping, page_mapcount(page), page_count(page)); printk(KERN_EMERG "Backtrace:\n"); dump_stack(); printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n"); @@ -87,13 +87,11 @@ static void bad_page(const char *function, struct page *page) 1 << PG_lru | 1 << PG_active | 1 << PG_dirty | - 1 << PG_maplock | - 1 << PG_anon | 1 << PG_swapcache | 1 << PG_writeback); set_page_count(page, 0); + reset_page_mapcount(page); page->mapping = NULL; - page->mapcount = 0; } #ifndef CONFIG_HUGETLB_PAGE @@ -229,8 +227,6 @@ static inline void free_pages_check(const char *function, struct page *page) 1 << PG_active | 1 << PG_reclaim | 1 << PG_slab | - 1 << PG_maplock | - 1 << PG_anon | 1 << PG_swapcache | 1 << PG_writeback ))) bad_page(function, page); @@ -279,6 +275,8 @@ void __free_pages_ok(struct page *page, unsigned int order) LIST_HEAD(list); int i; + arch_free_page(page, order); + mod_page_state(pgfree, 1 << order); for (i = 0 ; i < (1 << order) ; ++i) free_pages_check(__FUNCTION__, page + i); @@ -350,8 +348,6 @@ static void prep_new_page(struct page *page, int order) 1 << PG_active | 1 << PG_dirty | 1 << PG_reclaim | - 1 << PG_maplock | - 1 << PG_anon | 1 << PG_swapcache | 1 << PG_writeback ))) bad_page(__FUNCTION__, page); @@ -512,8 +508,12 @@ static void fastcall free_hot_cold_page(struct page *page, int cold) if (PageForeign(page)) return (PageForeignDestructor(page))(page); + arch_free_page(page, 0); + kernel_map_pages(page, 1, 0); inc_page_state(pgfree); + if (PageAnon(page)) + page->mapping = NULL; free_pages_check(__FUNCTION__, page); pcp = &zone->pageset[get_cpu()].pcp[cold]; local_irq_save(flags); @@ -603,83 +603,75 @@ __alloc_pages(unsigned int gfp_mask, unsigned int order, { const int wait = gfp_mask & __GFP_WAIT; unsigned long min; - struct zone **zones; + struct zone **zones, *z; struct page *page; struct reclaim_state reclaim_state; struct task_struct *p = current; int i; int alloc_type; int do_retry; + int can_try_harder; might_sleep_if(wait); + /* + * The caller may dip into page reserves a bit more if the caller + * cannot run direct reclaim, or is the caller has realtime scheduling + * policy + */ + can_try_harder = (unlikely(rt_task(p)) && !in_interrupt()) || !wait; + zones = zonelist->zones; /* the list of zones suitable for gfp_mask */ - if (zones[0] == NULL) /* no zones in the zonelist */ + + if (unlikely(zones[0] == NULL)) { + /* Should this ever happen?? */ return NULL; + } alloc_type = zone_idx(zones[0]); /* Go through the zonelist once, looking for a zone with enough free */ - for (i = 0; zones[i] != NULL; i++) { - struct zone *z = zones[i]; - - min = (1<protection[alloc_type]; + for (i = 0; (z = zones[i]) != NULL; i++) { + min = z->pages_low + (1<protection[alloc_type]; - /* - * We let real-time tasks dip their real-time paws a little - * deeper into reserves. - */ - if (rt_task(p)) - min -= z->pages_low >> 1; + if (z->free_pages < min) + continue; - if (z->free_pages >= min || - (!wait && z->free_pages >= z->pages_high)) { - page = buffered_rmqueue(z, order, gfp_mask); - if (page) { - zone_statistics(zonelist, z); - goto got_pg; - } - } + page = buffered_rmqueue(z, order, gfp_mask); + if (page) + goto got_pg; } - /* we're somewhat low on memory, failed to find what we needed */ - for (i = 0; zones[i] != NULL; i++) - wakeup_kswapd(zones[i]); - - /* Go through the zonelist again, taking __GFP_HIGH into account */ - for (i = 0; zones[i] != NULL; i++) { - struct zone *z = zones[i]; - - min = (1<protection[alloc_type]; + for (i = 0; (z = zones[i]) != NULL; i++) + wakeup_kswapd(z); + /* + * Go through the zonelist again. Let __GFP_HIGH and allocations + * coming from realtime tasks to go deeper into reserves + */ + for (i = 0; (z = zones[i]) != NULL; i++) { + min = z->pages_min; if (gfp_mask & __GFP_HIGH) - min -= z->pages_low >> 2; - if (rt_task(p)) - min -= z->pages_low >> 1; + min /= 2; + if (can_try_harder) + min -= min / 4; + min += (1<protection[alloc_type]; - if (z->free_pages >= min || - (!wait && z->free_pages >= z->pages_high)) { - page = buffered_rmqueue(z, order, gfp_mask); - if (page) { - zone_statistics(zonelist, z); - goto got_pg; - } - } - } + if (z->free_pages < min) + continue; - /* here we're in the low on memory slow path */ + page = buffered_rmqueue(z, order, gfp_mask); + if (page) + goto got_pg; + } -rebalance: + /* This allocation should allow future memory freeing. */ if ((p->flags & (PF_MEMALLOC | PF_MEMDIE)) && !in_interrupt()) { /* go through the zonelist yet again, ignoring mins */ - for (i = 0; zones[i] != NULL; i++) { - struct zone *z = zones[i]; - + for (i = 0; (z = zones[i]) != NULL; i++) { page = buffered_rmqueue(z, order, gfp_mask); - if (page) { - zone_statistics(zonelist, z); + if (page) goto got_pg; - } } goto nopage; } @@ -688,6 +680,8 @@ rebalance: if (!wait) goto nopage; +rebalance: + /* We now go into synchronous reclaim */ p->flags |= PF_MEMALLOC; reclaim_state.reclaimed_slab = 0; p->reclaim_state = &reclaim_state; @@ -698,27 +692,28 @@ rebalance: p->flags &= ~PF_MEMALLOC; /* go through the zonelist yet one more time */ - for (i = 0; zones[i] != NULL; i++) { - struct zone *z = zones[i]; + for (i = 0; (z = zones[i]) != NULL; i++) { + min = z->pages_min; + if (gfp_mask & __GFP_HIGH) + min /= 2; + if (can_try_harder) + min -= min / 4; + min += (1<protection[alloc_type]; - min = (1UL << order) + z->protection[alloc_type]; + if (z->free_pages < min) + continue; - if (z->free_pages >= min || - (!wait && z->free_pages >= z->pages_high)) { - page = buffered_rmqueue(z, order, gfp_mask); - if (page) { - zone_statistics(zonelist, z); - goto got_pg; - } - } + page = buffered_rmqueue(z, order, gfp_mask); + if (page) + goto got_pg; } /* * Don't let big-order allocations loop unless the caller explicitly * requests that. Wait for some write requests to complete then retry. * - * In this implementation, __GFP_REPEAT means __GFP_NOFAIL, but that - * may not be true in other implementations. + * In this implementation, __GFP_REPEAT means __GFP_NOFAIL for order + * <= 3, but that may not be true in other implementations. */ do_retry = 0; if (!(gfp_mask & __GFP_NORETRY)) { @@ -741,6 +736,7 @@ nopage: } return NULL; got_pg: + zone_statistics(zonelist, z); kernel_map_pages(page, 1 << order, 1); return page; } @@ -805,8 +801,8 @@ EXPORT_SYMBOL(__free_pages); fastcall void free_pages(unsigned long addr, unsigned int order) { if (addr != 0) { - BUG_ON(!virt_addr_valid(addr)); - __free_pages(virt_to_page(addr), order); + BUG_ON(!virt_addr_valid((void *)addr)); + __free_pages(virt_to_page((void *)addr), order); } } @@ -968,18 +964,36 @@ unsigned long __read_page_state(unsigned offset) return ret; } +void __get_zone_counts(unsigned long *active, unsigned long *inactive, + unsigned long *free, struct pglist_data *pgdat) +{ + struct zone *zones = pgdat->node_zones; + int i; + + *active = 0; + *inactive = 0; + *free = 0; + for (i = 0; i < MAX_NR_ZONES; i++) { + *active += zones[i].nr_active; + *inactive += zones[i].nr_inactive; + *free += zones[i].free_pages; + } +} + void get_zone_counts(unsigned long *active, unsigned long *inactive, unsigned long *free) { - struct zone *zone; + struct pglist_data *pgdat; *active = 0; *inactive = 0; *free = 0; - for_each_zone(zone) { - *active += zone->nr_active; - *inactive += zone->nr_inactive; - *free += zone->free_pages; + for_each_pgdat(pgdat) { + unsigned long l, m, n; + __get_zone_counts(&l, &m, &n, pgdat); + *active += l; + *inactive += m; + *free += n; } } @@ -1382,14 +1396,16 @@ static void __init calculate_zone_totalpages(struct pglist_data *pgdat, * up by free_all_bootmem() once the early boot process is * done. Non-atomic initialization, single-pass. */ -void __init memmap_init_zone(struct page *start, unsigned long size, int nid, - unsigned long zone, unsigned long start_pfn) +void __init memmap_init_zone(unsigned long size, int nid, unsigned long zone, + unsigned long start_pfn) { + struct page *start = pfn_to_page(start_pfn); struct page *page; for (page = start; page < (start + size); page++) { set_page_zone(page, NODEZONE(nid, zone)); set_page_count(page, 0); + reset_page_mapcount(page); SetPageReserved(page); INIT_LIST_HEAD(&page->lru); #ifdef WANT_PAGE_VIRTUAL @@ -1401,9 +1417,55 @@ void __init memmap_init_zone(struct page *start, unsigned long size, int nid, } } +/* + * Page buddy system uses "index >> (i+1)", where "index" is + * at most "size-1". + * + * The extra "+3" is to round down to byte size (8 bits per byte + * assumption). Thus we get "(size-1) >> (i+4)" as the last byte + * we can access. + * + * The "+1" is because we want to round the byte allocation up + * rather than down. So we should have had a "+7" before we shifted + * down by three. Also, we have to add one as we actually _use_ the + * last bit (it's [0,n] inclusive, not [0,n[). + * + * So we actually had +7+1 before we shift down by 3. But + * (n+8) >> 3 == (n >> 3) + 1 (modulo overflows, which we do not have). + * + * Finally, we LONG_ALIGN because all bitmap operations are on longs. + */ +unsigned long pages_to_bitmap_size(unsigned long order, unsigned long nr_pages) +{ + unsigned long bitmap_size; + + bitmap_size = (nr_pages-1) >> (order+4); + bitmap_size = LONG_ALIGN(bitmap_size+1); + + return bitmap_size; +} + +void zone_init_free_lists(struct pglist_data *pgdat, struct zone *zone, unsigned long size) +{ + int order; + for (order = 0; ; order++) { + unsigned long bitmap_size; + + INIT_LIST_HEAD(&zone->free_area[order].free_list); + if (order == MAX_ORDER-1) { + zone->free_area[order].map = NULL; + break; + } + + bitmap_size = pages_to_bitmap_size(order, size); + zone->free_area[order].map = + (unsigned long *) alloc_bootmem_node(pgdat, bitmap_size); + } +} + #ifndef __HAVE_ARCH_MEMMAP_INIT -#define memmap_init(start, size, nid, zone, start_pfn) \ - memmap_init_zone((start), (size), (nid), (zone), (start_pfn)) +#define memmap_init(size, nid, zone, start_pfn) \ + memmap_init_zone((size), (nid), (zone), (start_pfn)) #endif /* @@ -1418,7 +1480,6 @@ static void __init free_area_init_core(struct pglist_data *pgdat, unsigned long i, j; const unsigned long zone_required_alignment = 1UL << (MAX_ORDER-1); int cpu, nid = pgdat->node_id; - struct page *lmem_map = pgdat->node_mem_map; unsigned long zone_start_pfn = pgdat->node_start_pfn; pgdat->nr_zones = 0; @@ -1506,71 +1567,41 @@ static void __init free_area_init_core(struct pglist_data *pgdat, pgdat->nr_zones = j+1; - zone->zone_mem_map = lmem_map; + zone->zone_mem_map = pfn_to_page(zone_start_pfn); zone->zone_start_pfn = zone_start_pfn; if ((zone_start_pfn) & (zone_required_alignment-1)) printk("BUG: wrong zone alignment, it will crash\n"); - memmap_init(lmem_map, size, nid, j, zone_start_pfn); + memmap_init(size, nid, j, zone_start_pfn); zone_start_pfn += size; - lmem_map += size; - - for (i = 0; ; i++) { - unsigned long bitmap_size; - - INIT_LIST_HEAD(&zone->free_area[i].free_list); - if (i == MAX_ORDER-1) { - zone->free_area[i].map = NULL; - break; - } - /* - * Page buddy system uses "index >> (i+1)", - * where "index" is at most "size-1". - * - * The extra "+3" is to round down to byte - * size (8 bits per byte assumption). Thus - * we get "(size-1) >> (i+4)" as the last byte - * we can access. - * - * The "+1" is because we want to round the - * byte allocation up rather than down. So - * we should have had a "+7" before we shifted - * down by three. Also, we have to add one as - * we actually _use_ the last bit (it's [0,n] - * inclusive, not [0,n[). - * - * So we actually had +7+1 before we shift - * down by 3. But (n+8) >> 3 == (n >> 3) + 1 - * (modulo overflows, which we do not have). - * - * Finally, we LONG_ALIGN because all bitmap - * operations are on longs. - */ - bitmap_size = (size-1) >> (i+4); - bitmap_size = LONG_ALIGN(bitmap_size+1); - zone->free_area[i].map = - (unsigned long *) alloc_bootmem_node(pgdat, bitmap_size); - } + zone_init_free_lists(pgdat, zone, zone->spanned_pages); } } -void __init free_area_init_node(int nid, struct pglist_data *pgdat, - struct page *node_mem_map, unsigned long *zones_size, - unsigned long node_start_pfn, unsigned long *zholes_size) +void __init node_alloc_mem_map(struct pglist_data *pgdat) { unsigned long size; + size = (pgdat->node_spanned_pages + 1) * sizeof(struct page); + pgdat->node_mem_map = alloc_bootmem_node(pgdat, size); +#ifndef CONFIG_DISCONTIGMEM + mem_map = contig_page_data.node_mem_map; +#endif +} + +void __init free_area_init_node(int nid, struct pglist_data *pgdat, + unsigned long *zones_size, unsigned long node_start_pfn, + unsigned long *zholes_size) +{ pgdat->node_id = nid; pgdat->node_start_pfn = node_start_pfn; calculate_zone_totalpages(pgdat, zones_size, zholes_size); - if (!node_mem_map) { - size = (pgdat->node_spanned_pages + 1) * sizeof(struct page); - node_mem_map = alloc_bootmem_node(pgdat, size); - } - pgdat->node_mem_map = node_mem_map; + + if (!pfn_to_page(node_start_pfn)) + node_alloc_mem_map(pgdat); free_area_init_core(pgdat, zones_size, zholes_size); } @@ -1583,9 +1614,8 @@ EXPORT_SYMBOL(contig_page_data); void __init free_area_init(unsigned long *zones_size) { - free_area_init_node(0, &contig_page_data, NULL, zones_size, + free_area_init_node(0, &contig_page_data, zones_size, __pa(PAGE_OFFSET) >> PAGE_SHIFT, NULL); - mem_map = contig_page_data.node_mem_map; } #endif @@ -1844,11 +1874,11 @@ static void setup_per_zone_protection(void) * We never protect zones that don't have memory * in them (j>max_zone) or zones that aren't in * the zonelists for a certain type of - * allocation (j>i). We have to assign these to - * zero because the lower zones take + * allocation (j>=i). We have to assign these + * to zero because the lower zones take * contributions from the higher zones. */ - if (j > max_zone || j > i) { + if (j > max_zone || j >= i) { zone->protection[i] = 0; continue; } @@ -1857,7 +1887,6 @@ static void setup_per_zone_protection(void) */ zone->protection[i] = higherzone_val(zone, max_zone, i); - zone->protection[i] += zone->pages_low; } } } @@ -1992,41 +2021,40 @@ void *__init alloc_large_system_hash(const char *tablename, unsigned int *_hash_shift, unsigned int *_hash_mask) { - unsigned long mem, max, log2qty, size; + unsigned long long max; + unsigned long log2qty, size; void *table; - /* round applicable memory size up to nearest megabyte */ - mem = consider_highmem ? nr_all_pages : nr_kernel_pages; - mem += (1UL << (20 - PAGE_SHIFT)) - 1; - mem >>= 20 - PAGE_SHIFT; - mem <<= 20 - PAGE_SHIFT; - - /* limit to 1 bucket per 2^scale bytes of low memory (rounded up to - * nearest power of 2 in size) */ - if (scale > PAGE_SHIFT) - mem >>= (scale - PAGE_SHIFT); - else - mem <<= (PAGE_SHIFT - scale); - - mem = 1UL << (long_log2(mem) + 1); + /* allow the kernel cmdline to have a say */ + if (!numentries) { + /* round applicable memory size up to nearest megabyte */ + numentries = consider_highmem ? nr_all_pages : nr_kernel_pages; + numentries += (1UL << (20 - PAGE_SHIFT)) - 1; + numentries >>= 20 - PAGE_SHIFT; + numentries <<= 20 - PAGE_SHIFT; + + /* limit to 1 bucket per 2^scale bytes of low memory */ + if (scale > PAGE_SHIFT) + numentries >>= (scale - PAGE_SHIFT); + else + numentries <<= (PAGE_SHIFT - scale); + } + /* rounded up to nearest power of 2 in size */ + numentries = 1UL << (long_log2(numentries) + 1); - /* limit allocation size */ - max = (1UL << (PAGE_SHIFT + MAX_SYS_HASH_TABLE_ORDER)) / bucketsize; - if (max > mem) - max = mem; + /* limit allocation size to 1/16 total memory */ + max = ((unsigned long long)nr_all_pages << PAGE_SHIFT) >> 4; + do_div(max, bucketsize); - /* allow the kernel cmdline to have a say */ - if (!numentries || numentries > max) + if (numentries > max) numentries = max; log2qty = long_log2(numentries); do { size = bucketsize << log2qty; - - table = (void *) alloc_bootmem(size); - - } while (!table && size > PAGE_SIZE); + table = alloc_bootmem(size); + } while (!table && size > PAGE_SIZE && --log2qty); if (!table) panic("Failed to allocate %s hash table\n", tablename); diff --git a/linux-2.6.8.1-xen-sparse/net/core/skbuff.c b/linux-2.6.9-xen-sparse/net/core/skbuff.c similarity index 99% rename from linux-2.6.8.1-xen-sparse/net/core/skbuff.c rename to linux-2.6.9-xen-sparse/net/core/skbuff.c index 420d8857ae..41b512c5ff 100644 --- a/linux-2.6.8.1-xen-sparse/net/core/skbuff.c +++ b/linux-2.6.9-xen-sparse/net/core/skbuff.c @@ -364,6 +364,7 @@ struct sk_buff *skb_clone(struct sk_buff *skb, int gfp_mask) C(nfcache); C(nfct); nf_conntrack_get(skb->nfct); + C(nfctinfo); #ifdef CONFIG_NETFILTER_DEBUG C(nf_debug); #endif @@ -430,6 +431,7 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old) new->nfcache = old->nfcache; new->nfct = old->nfct; nf_conntrack_get(old->nfct); + new->nfctinfo = old->nfctinfo; #ifdef CONFIG_NETFILTER_DEBUG new->nf_debug = old->nf_debug; #endif diff --git a/linux-2.6.8.1-xen-sparse/net/ipv4/raw.c b/linux-2.6.9-xen-sparse/net/ipv4/raw.c similarity index 95% rename from linux-2.6.8.1-xen-sparse/net/ipv4/raw.c rename to linux-2.6.9-xen-sparse/net/ipv4/raw.c index 8cc0ea64f1..4796250642 100644 --- a/linux-2.6.8.1-xen-sparse/net/ipv4/raw.c +++ b/linux-2.6.9-xen-sparse/net/ipv4/raw.c @@ -326,6 +326,51 @@ error: return err; } +static void raw_probe_proto_opt(struct flowi *fl, struct msghdr *msg) +{ + struct iovec *iov; + u8 __user *type = NULL; + u8 __user *code = NULL; + int probed = 0; + int i; + + if (!msg->msg_iov) + return; + + for (i = 0; i < msg->msg_iovlen; i++) { + iov = &msg->msg_iov[i]; + if (!iov) + continue; + + switch (fl->proto) { + case IPPROTO_ICMP: + /* check if one-byte field is readable or not. */ + if (iov->iov_base && iov->iov_len < 1) + break; + + if (!type) { + type = iov->iov_base; + /* check if code field is readable or not. */ + if (iov->iov_len > 1) + code = type + 1; + } else if (!code) + code = iov->iov_base; + + if (type && code) { + get_user(fl->fl_icmp_type, type); + __get_user(fl->fl_icmp_code, code); + probed = 1; + } + break; + default: + probed = 1; + break; + } + if (probed) + break; + } +} + static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) { @@ -432,6 +477,9 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, .proto = inet->hdrincl ? IPPROTO_RAW : sk->sk_protocol, }; + if (!inet->hdrincl) + raw_probe_proto_opt(&fl, msg); + err = ip_route_output_flow(&rt, &fl, sk, !(msg->msg_flags&MSG_DONTWAIT)); } if (err) @@ -674,6 +722,7 @@ struct proto raw_prot = { .backlog_rcv = raw_rcv_skb, .hash = raw_v4_hash, .unhash = raw_v4_unhash, + .slab_obj_size = sizeof(struct raw_sock), }; #ifdef CONFIG_PROC_FS -- 2.30.2